If doesSupportDebugInformation() is false then do not try to emit dwarf debug info.
authorDevang Patel <dpatel@apple.com>
Wed, 11 Nov 2009 19:55:08 +0000 (19:55 +0000)
committerDevang Patel <dpatel@apple.com>
Wed, 11 Nov 2009 19:55:08 +0000 (19:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86874 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 3f26360f0b5f5d5070caded6afdca67debbee73b..f7c8d29d745a50e7b47c8986202660c4363657c1 100644 (file)
@@ -1905,6 +1905,9 @@ void DwarfDebug::BeginModule(Module *M, MachineModuleInfo *mmi) {
   if (TimePassesIsEnabled)
     DebugTimer->startTimer();
 
+  if (!MAI->doesSupportDebugInformation())
+    return;
+
   DebugInfoFinder DbgFinder;
   DbgFinder.processModule(*M);