DebugInfoFinder DbgFinder;
DbgFinder.processModule(*M);
- // Emit initial sections
- EmitSectionLabels();
-
+ // Emit initial sections.
+ if (DbgFinder.compile_unit_begin() != DbgFinder.compile_unit_end())
+ EmitSectionLabels();
+
// Create all the compile unit DIEs.
for (DebugInfoFinder::iterator I = DbgFinder.compile_unit_begin(),
E = DbgFinder.compile_unit_end(); I != E; ++I)
if (!ModuleCU)
return;
-
+
// Create DIEs for each subprogram.
for (DebugInfoFinder::iterator I = DbgFinder.subprogram_begin(),
E = DbgFinder.subprogram_end(); I != E; ++I)