mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Fix a pair of bugs in the emission of pubname tables:
1) Make sure we emit static member variables by checking at the end of createGlobalVariableDIE rather than piecemeal in the function. (As a note, createGlobalVariableDIE needs rewriting.) 2) Make sure we use the definition rather than declaration DIE for two things: a) determining linkage for gnu pubnames, and b) as the address of the DIE for global variables. (As a note, createGlobalVariableDIE really needs rewriting.) Adjust the testcase to make sure we're checking the correct DIEs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192761 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1472,10 +1472,8 @@ void CompileUnit::createGlobalVariableDIE(const MDNode *N) {
|
||||
addType(VariableDIE, GTy);
|
||||
|
||||
// Add scoping info.
|
||||
if (!GV.isLocalToUnit()) {
|
||||
if (!GV.isLocalToUnit())
|
||||
addFlag(VariableDIE, dwarf::DW_AT_external);
|
||||
addGlobalName(GV.getName(), VariableDIE);
|
||||
}
|
||||
|
||||
// Add line number info.
|
||||
addSourceLine(VariableDIE, GV);
|
||||
@ -1568,6 +1566,10 @@ void CompileUnit::createGlobalVariableDIE(const MDNode *N) {
|
||||
if (GV.getLinkageName() != "" && GV.getName() != GV.getLinkageName())
|
||||
addAccelName(GV.getLinkageName(), AddrDIE);
|
||||
}
|
||||
|
||||
if (!GV.isLocalToUnit())
|
||||
addGlobalName(GV.getName(),
|
||||
VariableSpecDIE ? VariableSpecDIE : VariableDIE);
|
||||
}
|
||||
|
||||
/// constructSubrangeDIE - Construct subrange DIE from DISubrange.
|
||||
|
Reference in New Issue
Block a user