mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 18:06:49 +00:00
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 ... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130702 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
194cfb08ff
commit
c455bb7dc7
@ -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
Block a user