Emit debug info, only if at least one compile unit is seen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62118 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2009-01-12 23:09:42 +00:00
parent 72b663575f
commit 3f7833a273

View File

@ -3596,10 +3596,16 @@ public:
/// SetDebugInfo - Create global DIEs and emit initial debug info sections.
/// This is inovked by the target AsmPrinter.
void SetDebugInfo() {
// FIXME - Check if the module has debug info or not.
void SetDebugInfo(MachineModuleInfo *mmi) {
// Create all the compile unit DIEs.
ConstructCompileUnits();
if (DW_CUs.empty())
return;
MMI = mmi;
shouldEmit = true;
// Create DIEs for each of the externally visible global variables.
ConstructGlobalVariableDIEs();