Add command line option to disable debug info printing in .s file. This option does...
[oota-llvm.git] / 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);