Add hiddent command line option, as an debugging aid, to disable .loc use.
authorDevang Patel <dpatel@apple.com>
Wed, 1 Dec 2010 15:36:49 +0000 (15:36 +0000)
committerDevang Patel <dpatel@apple.com>
Wed, 1 Dec 2010 15:36:49 +0000 (15:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120575 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llc/llc.cpp

index 180e13c7f9b863b8b4ddef11a631d05ecfb08829..d34a3ed745ab9473a4b9e3ce9cd86d93a5f11225 100644 (file)
@@ -96,6 +96,8 @@ FileType("filetype", cl::init(TargetMachine::CGFT_AssemblyFile),
 cl::opt<bool> NoVerify("disable-verify", cl::Hidden,
                        cl::desc("Do not verify input module"));
 
+cl::opt<bool> DisableDotLoc("disable-dot-loc", cl::Hidden,
+                            cl::desc("Do not use .loc entries"));
 
 static cl::opt<bool>
 DisableRedZone("disable-red-zone",
@@ -274,6 +276,9 @@ int main(int argc, char **argv) {
   assert(target.get() && "Could not allocate target machine!");
   TargetMachine &Target = *target.get();
 
+  if (DisableDotLoc)
+    Target.setMCUseLoc(false);
+
   // Figure out where we are going to send the output...
   OwningPtr<tool_output_file> Out
     (GetOutputStream(TheTarget->getName(), TheTriple.getOS(), argv[0]));