llvm.org GIT mirror llvm / 3f4b69d
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216792 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 6 years ago
2 changed file(s) with 9 addition(s) and 29 deletion(s). Raw diff Collapse all Expand all
318318
319319 attachLowHighPC(SPCU, *SPDie, FunctionBeginSym, FunctionEndSym);
320320
321 if (SPCU.getCUNode().getEmissionKind() != DIBuilder::LineTablesOnly) {
322 const TargetRegisterInfo *RI =
323 Asm->TM.getSubtargetImpl()->getRegisterInfo();
324 MachineLocation Location(RI->getFrameRegister(*Asm->MF));
325 SPCU.addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
326 }
321 const TargetRegisterInfo *RI = Asm->TM.getSubtargetImpl()->getRegisterInfo();
322 MachineLocation Location(RI->getFrameRegister(*Asm->MF));
323 SPCU.addAddress(*SPDie, dwarf::DW_AT_frame_base, Location);
327324
328325 // Add name to the name table, we do this here because we're guaranteed
329326 // to have concrete versions of our DW_TAG_subprogram nodes.
753750 for (MDNode *N : CU_Nodes->operands()) {
754751 DICompileUnit CUNode(N);
755752 DwarfCompileUnit &CU = constructDwarfCompileUnit(CUNode);
756 DIArray SPs = CUNode.getSubprograms();
757 for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i)
758 SPMap.insert(std::make_pair(SPs.getElement(i), &CU));
759 if (CU.getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly)
760 continue;
761753 DIArray ImportedEntities = CUNode.getImportedEntities();
762754 for (unsigned i = 0, e = ImportedEntities.getNumElements(); i != e; ++i)
763755 ScopesWithImportedEntities.push_back(std::make_pair(
768760 DIArray GVs = CUNode.getGlobalVariables();
769761 for (unsigned i = 0, e = GVs.getNumElements(); i != e; ++i)
770762 CU.createGlobalVariableDIE(DIGlobalVariable(GVs.getElement(i)));
763 DIArray SPs = CUNode.getSubprograms();
764 for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i)
765 SPMap.insert(std::make_pair(SPs.getElement(i), &CU));
771766 DIArray EnumTypes = CUNode.getEnumTypes();
772767 for (unsigned i = 0, e = EnumTypes.getNumElements(); i != e; ++i) {
773768 DIType Ty(EnumTypes.getElement(i));
837832 // If this subprogram has an abstract definition, reference that
838833 SPCU->addDIEEntry(*D, dwarf::DW_AT_abstract_origin, *AbsSPDIE);
839834 } else {
840 if (!D && TheCU.getEmissionKind() != DIBuilder::LineTablesOnly)
835 if (!D)
841836 // Lazily construct the subprogram if we didn't see either concrete or
842837 // inlined versions during codegen.
843838 D = SPCU->getOrCreateSubprogramDIE(SP);
844 if (D)
845 // And attach the attributes
846 SPCU->applySubprogramAttributesToDefinition(SP, *D);
839 // And attach the attributes
840 SPCU->applySubprogramAttributesToDefinition(SP, *D);
847841 }
848842 }
849843 }
16721666
16731667 LexicalScope *FnScope = LScopes.getCurrentFunctionScope();
16741668 DwarfCompileUnit &TheCU = *SPMap.lookup(FnScope->getScopeNode());
1675 if (TheCU.getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly && LScopes.getAbstractScopesList().empty()) {
1676 assert(ScopeVariables.empty());
1677 assert(CurrentFnArguments.empty());
1678 assert(DbgValues.empty());
1679 assert(AbstractVariables.empty());
1680 LabelsBeforeInsn.clear();
1681 LabelsAfterInsn.clear();
1682 PrevLabel = nullptr;
1683 CurFn = nullptr;
1684 return;
1685 }
16861669
16871670 // Construct abstract scopes.
16881671 for (LexicalScope *AScope : LScopes.getAbstractScopesList()) {
15161516 // be handled while processing variables.
15171517 constructSubprogramArguments(SPDie, Args);
15181518 }
1519
1520 if(getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly)
1521 return;
15221519
15231520 if (SP.isArtificial())
15241521 addFlag(SPDie, dwarf::DW_AT_artificial);