Add command line option to disable debug info printing in .s file. This option does...
authorDevang Patel <dpatel@apple.com>
Wed, 21 Apr 2010 19:08:53 +0000 (19:08 +0000)
committerDevang Patel <dpatel@apple.com>
Wed, 21 Apr 2010 19:08:53 +0000 (19:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102012 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 7588bbb9301a39ea45fd9329734ae8743d9bf31a..6e877c7e3ab7557c695c69f439316761b7d26d21 100644 (file)
@@ -44,6 +44,9 @@ using namespace llvm;
 static cl::opt<bool> PrintDbgScope("print-dbgscope", cl::Hidden,
      cl::desc("Print DbgScope information for each machine instruction"));
 
+static cl::opt<bool> DisableDebugInfoPrinting("disable-debug-info-print", cl::Hidden,
+     cl::desc("Disable debug info printing"));
+
 namespace {
   const char *DWARFGroupName = "DWARF Emission";
   const char *DbgTimerName = "DWARF Debug Writer";
@@ -1853,6 +1856,9 @@ void DwarfDebug::constructSubprogramDIE(MDNode *N) {
 /// content. Create global DIEs and emit initial debug info sections.
 /// This is inovked by the target AsmPrinter.
 void DwarfDebug::beginModule(Module *M) {
+  if (DisableDebugInfoPrinting)
+    return;
+
   DebugInfoFinder DbgFinder;
   DbgFinder.processModule(*M);