diff options
author | Devang Patel <dpatel@apple.com> | 2011-08-18 23:17:55 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-08-18 23:17:55 +0000 |
commit | 28bea08e531452992ff1e25e8584883dfbd4c232 (patch) | |
tree | c692a44d8770b22df8987a41306509c65ce9d16f /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | fb23462889ff2dcd016a4b4169ebce94a878218e (diff) |
Eliminate unnecessary forwarding function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138006 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index d096c0b9aa..0a284fefaa 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -510,19 +510,6 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) { 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. void DwarfDebug::constructSubprogramDIE(CompileUnit *TheCU, const MDNode *N) { @@ -561,7 +548,7 @@ void DwarfDebug::collectInfoFromNamedMDNodes(Module *M) { for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) { const MDNode *N = NMD->getOperand(i); if (CompileUnit *CU = CUMap.lookup(DIGlobalVariable(N).getCompileUnit())) - constructGlobalVariableDIE(CU, N); + CU->createGlobalVariableDIE(N); } 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) { const MDNode *N = *I; if (CompileUnit *CU = CUMap.lookup(DIGlobalVariable(N).getCompileUnit())) - constructGlobalVariableDIE(CU, N); + CU->createGlobalVariableDIE(N); } // Create DIEs for each subprogram. @@ -637,7 +624,7 @@ void DwarfDebug::beginModule(Module *M) { CompileUnit *CU = constructCompileUnit(CUNode); DIArray GVs = CUNode.getGlobalVariables(); for (unsigned i = 0, e = GVs.getNumElements(); i != e; ++i) - constructGlobalVariableDIE(CU, GVs.getElement(i)); + CU->createGlobalVariableDIE(GVs.getElement(i)); DIArray SPs = CUNode.getSubprograms(); for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i) constructSubprogramDIE(CU, SPs.getElement(i)); |