Avoid creating expensive comment string if it's not going to be printed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52992 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp
index 342aa01..0764968 100644
--- a/lib/Target/TargetMachine.cpp
+++ b/lib/Target/TargetMachine.cpp
@@ -36,8 +36,9 @@
CodeModel::Model CMModel;
bool PerformTailCallOpt;
bool OptimizeForSize;
- bool RealignStack;
unsigned StackAlignment;
+ bool RealignStack;
+ bool VerboseAsm;
}
static cl::opt<bool, true> PrintCode("print-machineinstrs",
@@ -138,17 +139,23 @@
cl::location(OptimizeForSize),
cl::init(false));
+static cl::opt<unsigned, true>
+OverrideStackAlignment("stack-alignment",
+ cl::desc("Override default stack alignment"),
+ cl::location(StackAlignment),
+ cl::init(0));
+
static cl::opt<bool, true>
EnableRealignStack("realign-stack",
cl::desc("Realign stack if needed"),
cl::location(RealignStack),
cl::init(true));
-static cl::opt<unsigned, true>
-OverrideStackAlignment("stack-alignment",
- cl::desc("Override default stack alignment"),
- cl::location(StackAlignment),
- cl::init(0));
+static cl::opt<bool, true>
+AsmVerbose("asm-verbose", cl::desc("Add comments to directives."),
+ cl::location(VerboseAsm),
+ cl::init(false));
+
//---------------------------------------------------------------------------
// TargetMachine Class