summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-29 15:58:35 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-29 15:58:35 +0000
commite872a6eb91eb915ae643d7bf97304d6f0cff140d (patch)
tree8ed11c5dcd572014ed0b94d7541b66d7ed9764ee /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
parent883ae9d9a3c1056ff9910b639f5538b901dc2ca8 (diff)
downloadbcm5719-llvm-e872a6eb91eb915ae643d7bf97304d6f0cff140d.tar.gz
bcm5719-llvm-e872a6eb91eb915ae643d7bf97304d6f0cff140d.zip
DwarfDebug: Split the initialization of abstract and non-abstract subprogram DIEs.
These were called from distinct places and had significant distinct behavior. No need to make that a dynamic check inside the function rather than just having two functions (refactoring some common code into a helper function to be called from the two separate functions). llvm-svn: 207539
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 862b1ba3f2e..27c5b3de34b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -346,7 +346,7 @@ class DwarfDebug : public AsmPrinterHandler {
/// DW_AT_low_pc and DW_AT_high_pc attributes. If there are global
/// variables in this scope then create and insert DIEs for these
/// variables.
- DIE *updateSubprogramScopeDIE(DwarfCompileUnit &SPCU, DISubprogram SP);
+ DIE &updateSubprogramScopeDIE(DwarfCompileUnit &SPCU, DISubprogram SP);
/// \brief A helper function to check whether the DIE for a given Scope is
/// going to be null.
@@ -370,8 +370,12 @@ class DwarfDebug : public AsmPrinterHandler {
/// \brief Construct a DIE for this scope.
std::unique_ptr<DIE> constructScopeDIE(DwarfCompileUnit &TheCU,
LexicalScope *Scope);
- /// \brief Construct a DIE for this scope.
- DIE *constructSubprogramScopeDIE(DwarfCompileUnit &TheCU, LexicalScope *Scope);
+ void createAndAddScopeChildren(DwarfCompileUnit &TheCU, LexicalScope *Scope,
+ DIE &ScopeDIE);
+ /// \brief Construct a DIE for this abstract scope.
+ void constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU, LexicalScope *Scope);
+ /// \brief Construct a DIE for this subprogram scope.
+ DIE &constructSubprogramScopeDIE(DwarfCompileUnit &TheCU, LexicalScope *Scope);
/// A helper function to create children of a Scope DIE.
DIE *createScopeChildrenDIE(DwarfCompileUnit &TheCU, LexicalScope *Scope,
SmallVectorImpl<std::unique_ptr<DIE>> &Children);
OpenPOWER on IntegriCloud