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 | d859d86538277c5e584e2da2d2f157b6a9c697cc (patch) | |
| tree | 8a29293cc85a81d7f5c237948f0f34bcc4f546de /llvm/lib | |
| parent | 1c9eef72b442a12235d3b47cc63ae3917d139cfd (diff) | |
| download | bcm5719-llvm-d859d86538277c5e584e2da2d2f157b6a9c697cc.tar.gz bcm5719-llvm-d859d86538277c5e584e2da2d2f157b6a9c697cc.zip | |
Existence of a compile unit for input source file is a good indicator to check debug info's presence in a module.
llvm-svn: 83348
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 11 | 
1 files changed, 1 insertions, 10 deletions
| diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index b80d2e75aad..149da048108 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/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) | 

