[llvm] r216792 - Revert accidentally committed patches r216787-r216789
David Blaikie
dblaikie at gmail.com
Fri Aug 29 15:10:52 PDT 2014
Author: dblaikie
Date: Fri Aug 29 17:10:52 2014
New Revision: 216792
URL: http://llvm.org/viewvc/llvm-project?rev=216792&view=rev
Log:
Revert accidentally committed patches r216787-r216789
Rushed when I realized I hadn't committed the FreeDeleter for a clang
change I'd committed, and didn't check that I had things lying around in
my client.
Apologies for the noise.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=216792&r1=216791&r2=216792&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Aug 29 17:10:52 2014
@@ -319,12 +319,9 @@ DIE &DwarfDebug::updateSubprogramScopeDI
attachLowHighPC(SPCU, *SPDie, FunctionBeginSym, FunctionEndSym);
- if (SPCU.getCUNode().getEmissionKind() != DIBuilder::LineTablesOnly) {
- const TargetRegisterInfo *RI =
- Asm->TM.getSubtargetImpl()->getRegisterInfo();
- MachineLocation Location(RI->getFrameRegister(*Asm->MF));
- SPCU.addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
- }
+ const TargetRegisterInfo *RI = Asm->TM.getSubtargetImpl()->getRegisterInfo();
+ MachineLocation Location(RI->getFrameRegister(*Asm->MF));
+ SPCU.addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
// Add name to the name table, we do this here because we're guaranteed
// to have concrete versions of our DW_TAG_subprogram nodes.
@@ -754,11 +751,6 @@ void DwarfDebug::beginModule() {
for (MDNode *N : CU_Nodes->operands()) {
DICompileUnit CUNode(N);
DwarfCompileUnit &CU = constructDwarfCompileUnit(CUNode);
- DIArray SPs = CUNode.getSubprograms();
- for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i)
- SPMap.insert(std::make_pair(SPs.getElement(i), &CU));
- if (CU.getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly)
- continue;
DIArray ImportedEntities = CUNode.getImportedEntities();
for (unsigned i = 0, e = ImportedEntities.getNumElements(); i != e; ++i)
ScopesWithImportedEntities.push_back(std::make_pair(
@@ -769,6 +761,9 @@ void DwarfDebug::beginModule() {
DIArray GVs = CUNode.getGlobalVariables();
for (unsigned i = 0, e = GVs.getNumElements(); i != e; ++i)
CU.createGlobalVariableDIE(DIGlobalVariable(GVs.getElement(i)));
+ DIArray SPs = CUNode.getSubprograms();
+ for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i)
+ SPMap.insert(std::make_pair(SPs.getElement(i), &CU));
DIArray EnumTypes = CUNode.getEnumTypes();
for (unsigned i = 0, e = EnumTypes.getNumElements(); i != e; ++i) {
DIType Ty(EnumTypes.getElement(i));
@@ -838,13 +833,12 @@ void DwarfDebug::finishSubprogramDefinit
// If this subprogram has an abstract definition, reference that
SPCU->addDIEEntry(*D, dwarf::DW_AT_abstract_origin, *AbsSPDIE);
} else {
- if (!D && TheCU.getEmissionKind() != DIBuilder::LineTablesOnly)
+ if (!D)
// Lazily construct the subprogram if we didn't see either concrete or
// inlined versions during codegen.
D = SPCU->getOrCreateSubprogramDIE(SP);
- if (D)
- // And attach the attributes
- SPCU->applySubprogramAttributesToDefinition(SP, *D);
+ // And attach the attributes
+ SPCU->applySubprogramAttributesToDefinition(SP, *D);
}
}
}
@@ -1673,17 +1667,6 @@ void DwarfDebug::endFunction(const Machi
LexicalScope *FnScope = LScopes.getCurrentFunctionScope();
DwarfCompileUnit &TheCU = *SPMap.lookup(FnScope->getScopeNode());
- if (TheCU.getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly && LScopes.getAbstractScopesList().empty()) {
- assert(ScopeVariables.empty());
- assert(CurrentFnArguments.empty());
- assert(DbgValues.empty());
- assert(AbstractVariables.empty());
- LabelsBeforeInsn.clear();
- LabelsAfterInsn.clear();
- PrevLabel = nullptr;
- CurFn = nullptr;
- return;
- }
// Construct abstract scopes.
for (LexicalScope *AScope : LScopes.getAbstractScopesList()) {
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=216792&r1=216791&r2=216792&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Fri Aug 29 17:10:52 2014
@@ -1518,9 +1518,6 @@ void DwarfUnit::applySubprogramAttribute
constructSubprogramArguments(SPDie, Args);
}
- if(getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly)
- return;
-
if (SP.isArtificial())
addFlag(SPDie, dwarf::DW_AT_artificial);
More information about the llvm-commits
mailing list