diff options
author | Devang Patel <dpatel@apple.com> | 2009-10-06 00:03:14 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-10-06 00:03:14 +0000 |
commit | 95d477eff9aa5b68b022546565f0a41eee38cb89 (patch) | |
tree | 73957a6f9fbd592cc0d4a08502e0235d7dfa510f /lib | |
parent | 186ee5cfbdf8c08394250e41d4bd6493999d56a1 (diff) | |
download | external_llvm-95d477eff9aa5b68b022546565f0a41eee38cb89.zip external_llvm-95d477eff9aa5b68b022546565f0a41eee38cb89.tar.gz external_llvm-95d477eff9aa5b68b022546565f0a41eee38cb89.tar.bz2 |
Existence of a compile unit for input source file is a good indicator to check debug info's presence in a module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83348 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index b80d2e7..149da04 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1671,15 +1671,6 @@ void DwarfDebug::BeginModule(Module *M, MachineModuleInfo *mmi) { if (!ModuleCU) ModuleCU = CompileUnits[0]; - // If there is not any debug info available for any global variables and any - // subprograms then there is not any debug info to emit. - if (DbgFinder.global_variable_count() == 0 - && DbgFinder.subprogram_count() == 0) { - if (TimePassesIsEnabled) - DebugTimer->stopTimer(); - return; - } - // Create DIEs for each of the externally visible global variables. for (DebugInfoFinder::iterator I = DbgFinder.global_variable_begin(), E = DbgFinder.global_variable_end(); I != E; ++I) { @@ -1728,7 +1719,7 @@ void DwarfDebug::BeginModule(Module *M, MachineModuleInfo *mmi) { /// EndModule - Emit all Dwarf sections that should come after the content. /// void DwarfDebug::EndModule() { - if (!ShouldEmitDwarfDebug()) + if (!ModuleCU) return; if (TimePassesIsEnabled) |