From e16ad1a9833c89965c921f137cfb6c424ff3e9c2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 2 Feb 2010 22:58:13 +0000 Subject: [PATCH] simplify getVerboseAsm git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95153 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LLVMTargetMachine.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 3063e5e1efd..a4f313938d5 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -66,12 +66,12 @@ static cl::opt AsmVerbose("asm-verbose", cl::desc("Add comments to directives."), cl::init(cl::BOU_UNSET)); -static bool getVerboseAsm(bool VDef) { +static bool getVerboseAsm() { switch (AsmVerbose) { - default: - case cl::BOU_UNSET: return VDef; - case cl::BOU_TRUE: return true; - case cl::BOU_FALSE: return false; + default: + case cl::BOU_UNSET: return TargetMachine::getAsmVerbosityDefault(); + case cl::BOU_TRUE: return true; + case cl::BOU_FALSE: return false; } } @@ -123,7 +123,7 @@ LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, case CGFT_AssemblyFile: { FunctionPass *Printer = getTarget().createAsmPrinter(Out, *this, getMCAsmInfo(), - getVerboseAsm(getAsmVerbosityDefault())); + getVerboseAsm()); if (Printer == 0) return CGFT_ErrorOccurred; PM.add(Printer); break; -- 2.11.0