From 1a6e39987497d8eea51fd72f2d28241a84ab663c Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 21 Apr 2010 19:08:53 +0000 Subject: Add command line option to disable debug info printing in .s file. This option does not impact debug info generation and preservation through earlier compile starges. llvm-svn: 102012 --- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 7588bbb9301..6e877c7e3ab 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -44,6 +44,9 @@ using namespace llvm; static cl::opt PrintDbgScope("print-dbgscope", cl::Hidden, cl::desc("Print DbgScope information for each machine instruction")); +static cl::opt 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); -- cgit v1.2.3