diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-11-02 08:18:06 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-11-02 08:18:06 +0000 |
commit | 279c451c0bf0be07255c152bd78f952641b158c4 (patch) | |
tree | 027e132cbfd60c1141d30bf17d7e7f4425317b26 /llvm/lib/CodeGen | |
parent | 3363a57c8e816473a409e208b87df59de1014abe (diff) | |
download | bcm5719-llvm-279c451c0bf0be07255c152bd78f952641b158c4.tar.gz bcm5719-llvm-279c451c0bf0be07255c152bd78f952641b158c4.zip |
Remove the last mention of LineTablesOnly from DwarfUnit, sinking it into DwarfCompileUnit
This is a useful distinction/invariant/delination to make because
LineTablesOnly mode is never relevant to type units, so it's clear that
we're not doing weird line-tables-only-with-types by making this API
choice.
It also lays the foundations nicely for adding gmlt-like data to fission
skeleton CUs while limiting the effects to CUs and not TUs.
llvm-svn: 221093
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index c691a2c261b..485ea34dc5c 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -832,7 +832,8 @@ void DwarfCompileUnit::applySubprogramAttributesToDefinition(DISubprogram SP, DIE &SPDie) { DISubprogram SPDecl = SP.getFunctionDeclaration(); DIScope Context = resolve(SPDecl ? SPDecl.getContext() : SP.getContext()); - applySubprogramAttributes(SP, SPDie); + applySubprogramAttributes(SP, SPDie, getCUNode().getEmissionKind() == + DIBuilder::LineTablesOnly); addGlobalName(SP.getName(), SPDie, Context); } } // end llvm namespace diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 8a00f881c96..b29b1631df1 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1257,7 +1257,8 @@ DIE *DwarfUnit::getOrCreateSubprogramDIE(DISubprogram SP) { return &SPDie; } -void DwarfUnit::applySubprogramAttributes(DISubprogram SP, DIE &SPDie) { +void DwarfUnit::applySubprogramAttributes(DISubprogram SP, DIE &SPDie, + bool Minimal) { DIE *DeclDie = nullptr; StringRef DeclLinkageName; if (DISubprogram SPDecl = SP.getFunctionDeclaration()) { @@ -1292,7 +1293,7 @@ void DwarfUnit::applySubprogramAttributes(DISubprogram SP, DIE &SPDie) { addString(SPDie, dwarf::DW_AT_name, SP.getName()); // Skip the rest of the attributes under -gmlt to save space. - if(getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly) + if (Minimal) return; addSourceLine(SPDie, SP); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h index 32683c4ebfe..2c80c124a3e 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h @@ -299,7 +299,8 @@ public: /// getOrCreateSubprogramDIE - Create new DIE using SP. DIE *getOrCreateSubprogramDIE(DISubprogram SP); - void applySubprogramAttributes(DISubprogram SP, DIE &SPDie); + void applySubprogramAttributes(DISubprogram SP, DIE &SPDie, + bool Minimal = false); /// getOrCreateTypeDIE - Find existing DIE or create new DIE for the /// given DIType. |