summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-05-20 23:59:50 +0000
committerEric Christopher <echristo@gmail.com>2014-05-20 23:59:50 +0000
commit4f6d26dbe89d51362b665fe8fb0f206434e52471 (patch)
tree5a8a56dc301ac59d51362fd454b8a03f81fbfba8 /include
parentb38059ab25cdabc9bcf4819cd82ab5955e8d3e3e (diff)
downloadllvm-4f6d26dbe89d51362b665fe8fb0f206434e52471.tar.gz
llvm-4f6d26dbe89d51362b665fe8fb0f206434e52471.tar.bz2
llvm-4f6d26dbe89d51362b665fe8fb0f206434e52471.tar.xz
Move the verbose asm option to be part of the options struct and
set appropriately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCTargetOptions.h4
-rw-r--r--include/llvm/MC/MCTargetOptionsCommandFlags.h4
-rw-r--r--include/llvm/Target/TargetMachine.h4
3 files changed, 9 insertions, 3 deletions
diff --git a/include/llvm/MC/MCTargetOptions.h b/include/llvm/MC/MCTargetOptions.h
index ad34958ae3..b4f5a97972 100644
--- a/include/llvm/MC/MCTargetOptions.h
+++ b/include/llvm/MC/MCTargetOptions.h
@@ -28,6 +28,7 @@ public:
unsigned MCUseDwarfDirectory : 1;
unsigned ShowMCEncoding : 1;
unsigned ShowMCInst : 1;
+ unsigned AsmVerbose : 1;
MCTargetOptions();
};
@@ -39,7 +40,8 @@ inline bool operator==(const MCTargetOptions &LHS, const MCTargetOptions &RHS) {
ARE_EQUAL(MCSaveTempLabels) &&
ARE_EQUAL(MCUseDwarfDirectory) &&
ARE_EQUAL(ShowMCEncoding) &&
- ARE_EQUAL(ShowMCInst));
+ ARE_EQUAL(ShowMCInst) &&
+ ARE_EQUAL(AsmVerbose));
#undef ARE_EQUAL
}
diff --git a/include/llvm/MC/MCTargetOptionsCommandFlags.h b/include/llvm/MC/MCTargetOptionsCommandFlags.h
index 1edf8f75b1..55ac142157 100644
--- a/include/llvm/MC/MCTargetOptionsCommandFlags.h
+++ b/include/llvm/MC/MCTargetOptionsCommandFlags.h
@@ -47,6 +47,9 @@ cl::opt<bool> ShowMCEncoding("show-mc-encoding", cl::Hidden,
cl::opt<bool> ShowMCInst("show-mc-inst", cl::Hidden,
cl::desc("Show instruction structure in .s output"));
+cl::opt<bool> AsmVerbose("asm-verbose", cl::desc("Add comments to directives."),
+ cl::init(false));
+
static inline MCTargetOptions InitMCTargetOptionsFromFlags() {
MCTargetOptions Options;
Options.SanitizeAddress =
@@ -57,6 +60,7 @@ static inline MCTargetOptions InitMCTargetOptionsFromFlags() {
Options.MCSaveTempLabels = SaveTempLabels;
Options.ShowMCEncoding = ShowMCEncoding;
Options.ShowMCInst = ShowMCInst;
+ Options.AsmVerbose = AsmVerbose;
return Options;
}
diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h
index 17ebd07e5d..b263c571d9 100644
--- a/include/llvm/Target/TargetMachine.h
+++ b/include/llvm/Target/TargetMachine.h
@@ -187,11 +187,11 @@ public:
/// getAsmVerbosityDefault - Returns the default value of asm verbosity.
///
- static bool getAsmVerbosityDefault();
+ bool getAsmVerbosityDefault() const ;
/// setAsmVerbosityDefault - Set the default value of asm verbosity. Default
/// is false.
- static void setAsmVerbosityDefault(bool);
+ void setAsmVerbosityDefault(bool);
/// getDataSections - Return true if data objects should be emitted into their
/// own section, corresponds to -fdata-sections.