summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LLVMTargetMachine.cpp
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 /lib/CodeGen/LLVMTargetMachine.cpp
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 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--lib/CodeGen/LLVMTargetMachine.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index c8211b76be..a5ac0578ab 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/lib/CodeGen/LLVMTargetMachine.cpp
@@ -43,19 +43,6 @@ static cl::opt<cl::boolOrDefault>
EnableFastISelOption("fast-isel", cl::Hidden,
cl::desc("Enable the \"fast\" instruction selector"));
-static cl::opt<cl::boolOrDefault>
-AsmVerbose("asm-verbose", cl::desc("Add comments to directives."),
- cl::init(cl::BOU_UNSET));
-
-static bool getVerboseAsm() {
- switch (AsmVerbose) {
- case cl::BOU_UNSET: return TargetMachine::getAsmVerbosityDefault();
- case cl::BOU_TRUE: return true;
- case cl::BOU_FALSE: return false;
- }
- llvm_unreachable("Invalid verbose asm state");
-}
-
void LLVMTargetMachine::initAsmInfo() {
MCAsmInfo *TmpAsmInfo = TheTarget.createMCAsmInfo(*getRegisterInfo(),
TargetTriple);
@@ -188,8 +175,9 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
MCAsmBackend *MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(),
TargetCPU);
MCStreamer *S = getTarget().createAsmStreamer(
- *Context, Out, getVerboseAsm(), Options.MCOptions.MCUseDwarfDirectory,
- InstPrinter, MCE, MAB, Options.MCOptions.ShowMCInst);
+ *Context, Out, Options.MCOptions.AsmVerbose,
+ Options.MCOptions.MCUseDwarfDirectory, InstPrinter, MCE, MAB,
+ Options.MCOptions.ShowMCInst);
AsmStreamer.reset(S);
break;
}