mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Eliminate unnecessary forwarding function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138006 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1035,6 +1035,9 @@ void CompileUnit::createGlobalVariableDIE(const MDNode *N) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
DIGlobalVariable GV(N);
|
DIGlobalVariable GV(N);
|
||||||
|
if (!GV.Verify())
|
||||||
|
return;
|
||||||
|
|
||||||
DIE *VariableDIE = new DIE(GV.getTag());
|
DIE *VariableDIE = new DIE(GV.getTag());
|
||||||
// Add to map.
|
// Add to map.
|
||||||
insertDIE(N, VariableDIE);
|
insertDIE(N, VariableDIE);
|
||||||
|
@ -510,19 +510,6 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) {
|
|||||||
return NewCU;
|
return NewCU;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// constructGlobalVariableDIE - Construct global variable DIE.
|
|
||||||
void DwarfDebug::constructGlobalVariableDIE(CompileUnit *TheCU,
|
|
||||||
const MDNode *N) {
|
|
||||||
DIGlobalVariable GV(N);
|
|
||||||
|
|
||||||
// If debug information is malformed then ignore it.
|
|
||||||
if (GV.Verify() == false)
|
|
||||||
return;
|
|
||||||
|
|
||||||
TheCU->createGlobalVariableDIE(N);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// construct SubprogramDIE - Construct subprogram DIE.
|
/// construct SubprogramDIE - Construct subprogram DIE.
|
||||||
void DwarfDebug::constructSubprogramDIE(CompileUnit *TheCU,
|
void DwarfDebug::constructSubprogramDIE(CompileUnit *TheCU,
|
||||||
const MDNode *N) {
|
const MDNode *N) {
|
||||||
@ -561,7 +548,7 @@ void DwarfDebug::collectInfoFromNamedMDNodes(Module *M) {
|
|||||||
for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) {
|
for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) {
|
||||||
const MDNode *N = NMD->getOperand(i);
|
const MDNode *N = NMD->getOperand(i);
|
||||||
if (CompileUnit *CU = CUMap.lookup(DIGlobalVariable(N).getCompileUnit()))
|
if (CompileUnit *CU = CUMap.lookup(DIGlobalVariable(N).getCompileUnit()))
|
||||||
constructGlobalVariableDIE(CU, N);
|
CU->createGlobalVariableDIE(N);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NamedMDNode *NMD = M->getNamedMetadata("llvm.dbg.enum"))
|
if (NamedMDNode *NMD = M->getNamedMetadata("llvm.dbg.enum"))
|
||||||
@ -607,7 +594,7 @@ bool DwarfDebug::collectLegacyDebugInfo(Module *M) {
|
|||||||
E = DbgFinder.global_variable_end(); I != E; ++I) {
|
E = DbgFinder.global_variable_end(); I != E; ++I) {
|
||||||
const MDNode *N = *I;
|
const MDNode *N = *I;
|
||||||
if (CompileUnit *CU = CUMap.lookup(DIGlobalVariable(N).getCompileUnit()))
|
if (CompileUnit *CU = CUMap.lookup(DIGlobalVariable(N).getCompileUnit()))
|
||||||
constructGlobalVariableDIE(CU, N);
|
CU->createGlobalVariableDIE(N);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create DIEs for each subprogram.
|
// Create DIEs for each subprogram.
|
||||||
@ -637,7 +624,7 @@ void DwarfDebug::beginModule(Module *M) {
|
|||||||
CompileUnit *CU = constructCompileUnit(CUNode);
|
CompileUnit *CU = constructCompileUnit(CUNode);
|
||||||
DIArray GVs = CUNode.getGlobalVariables();
|
DIArray GVs = CUNode.getGlobalVariables();
|
||||||
for (unsigned i = 0, e = GVs.getNumElements(); i != e; ++i)
|
for (unsigned i = 0, e = GVs.getNumElements(); i != e; ++i)
|
||||||
constructGlobalVariableDIE(CU, GVs.getElement(i));
|
CU->createGlobalVariableDIE(GVs.getElement(i));
|
||||||
DIArray SPs = CUNode.getSubprograms();
|
DIArray SPs = CUNode.getSubprograms();
|
||||||
for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i)
|
for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i)
|
||||||
constructSubprogramDIE(CU, SPs.getElement(i));
|
constructSubprogramDIE(CU, SPs.getElement(i));
|
||||||
|
@ -417,9 +417,6 @@ private:
|
|||||||
/// metadata node with tag DW_TAG_compile_unit.
|
/// metadata node with tag DW_TAG_compile_unit.
|
||||||
CompileUnit *constructCompileUnit(const MDNode *N);
|
CompileUnit *constructCompileUnit(const MDNode *N);
|
||||||
|
|
||||||
/// constructGlobalVariableDIE - Construct global variable DIE.
|
|
||||||
void constructGlobalVariableDIE(CompileUnit *TheCU, const MDNode *N);
|
|
||||||
|
|
||||||
/// construct SubprogramDIE - Construct subprogram DIE.
|
/// construct SubprogramDIE - Construct subprogram DIE.
|
||||||
void constructSubprogramDIE(CompileUnit *TheCU, const MDNode *N);
|
void constructSubprogramDIE(CompileUnit *TheCU, const MDNode *N);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user