forked from OSchip/llvm-project
Emit debug info for global variables first.
This works around a limitation in gdb which is reported by following inherit.exp test failures from gdb testsuite. gdb.cp/inherit.exp: print g_vB.vB::vb gdb.cp/inherit.exp: print g_vB.vB::vx gdb.cp/inherit.exp: print g_vC.vC::vc gdb.cp/inherit.exp: print g_vC.vC::vx gdb.cp/inherit.exp: print g_vD.vB::vb ... llvm-svn: 130702
This commit is contained in:
parent
61be0903e5
commit
420ab5f180
|
@ -1141,16 +1141,16 @@ void DwarfDebug::beginModule(Module *M) {
|
|||
E = DbgFinder.compile_unit_end(); I != E; ++I)
|
||||
constructCompileUnit(*I);
|
||||
|
||||
// Create DIEs for each subprogram.
|
||||
for (DebugInfoFinder::iterator I = DbgFinder.subprogram_begin(),
|
||||
E = DbgFinder.subprogram_end(); I != E; ++I)
|
||||
constructSubprogramDIE(*I);
|
||||
|
||||
// Create DIEs for each global variable.
|
||||
for (DebugInfoFinder::iterator I = DbgFinder.global_variable_begin(),
|
||||
E = DbgFinder.global_variable_end(); I != E; ++I)
|
||||
constructGlobalVariableDIE(*I);
|
||||
|
||||
// Create DIEs for each subprogram.
|
||||
for (DebugInfoFinder::iterator I = DbgFinder.subprogram_begin(),
|
||||
E = DbgFinder.subprogram_end(); I != E; ++I)
|
||||
constructSubprogramDIE(*I);
|
||||
|
||||
//getOrCreateTypeDIE
|
||||
if (NamedMDNode *NMD = M->getNamedMetadata("llvm.dbg.enum"))
|
||||
for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) {
|
||||
|
|
Loading…
Reference in New Issue