summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-10-09 00:21:42 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-10-09 00:21:42 +0000
commitde12375c96afe3bc12bb88b3376f5f6a7a9d8c86 (patch)
tree38dfe3e79f67308d3b1256048d062bece9c70de5 /llvm/lib/CodeGen
parent952bccd2128ea8322358d99b22d9ccc936b0b7a6 (diff)
downloadbcm5719-llvm-de12375c96afe3bc12bb88b3376f5f6a7a9d8c86.tar.gz
bcm5719-llvm-de12375c96afe3bc12bb88b3376f5f6a7a9d8c86.zip
Push DwarfDebug::attachRangesOrLowHighPC down into DwarfCompileUnit
llvm-svn: 219372
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp10
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h3
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp14
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h3
4 files changed, 15 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 8cc283f9a6f..3e205132899 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -421,4 +421,14 @@ DwarfCompileUnit::addScopeRangeList(DIE &ScopeDIE,
addRangeList(std::move(List));
}
+void DwarfCompileUnit::attachRangesOrLowHighPC(
+ DIE &Die, const SmallVectorImpl<InsnRange> &Ranges) {
+ assert(!Ranges.empty());
+ if (Ranges.size() == 1)
+ attachLowHighPC(Die, DD->getLabelBeforeInsn(Ranges.front().first),
+ DD->getLabelAfterInsn(Ranges.front().second));
+ else
+ addScopeRangeList(Die, Ranges);
+}
+
} // end llvm namespace
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index 2a0088e475f..9623c079bfa 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -86,6 +86,9 @@ public:
/// lexical scope.
void addScopeRangeList(DIE &ScopeDIE,
const SmallVectorImpl<InsnRange> &Range);
+
+ void attachRangesOrLowHighPC(DIE &D,
+ const SmallVectorImpl<InsnRange> &Ranges);
};
} // end llvm namespace
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 4d60259861c..56d29736365 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -330,16 +330,6 @@ bool DwarfDebug::isLexicalScopeDIENull(LexicalScope *Scope) {
return !getLabelAfterInsn(Ranges.front().second);
}
-void DwarfDebug::attachRangesOrLowHighPC(DwarfCompileUnit &TheCU, DIE &Die,
- const SmallVectorImpl<InsnRange> &Ranges) {
- assert(!Ranges.empty());
- if (Ranges.size() == 1)
- TheCU.attachLowHighPC(Die, getLabelBeforeInsn(Ranges.front().first),
- getLabelAfterInsn(Ranges.front().second));
- else
- TheCU.addScopeRangeList(Die, Ranges);
-}
-
// Construct new DW_TAG_lexical_block for this scope and attach
// DW_AT_low_pc/DW_AT_high_pc labels.
std::unique_ptr<DIE>
@@ -352,7 +342,7 @@ DwarfDebug::constructLexicalScopeDIE(DwarfCompileUnit &TheCU,
if (Scope->isAbstractScope())
return ScopeDIE;
- attachRangesOrLowHighPC(TheCU, *ScopeDIE, Scope->getRanges());
+ TheCU.attachRangesOrLowHighPC(*ScopeDIE, Scope->getRanges());
return ScopeDIE;
}
@@ -373,7 +363,7 @@ DwarfDebug::constructInlinedScopeDIE(DwarfCompileUnit &TheCU,
auto ScopeDIE = make_unique<DIE>(dwarf::DW_TAG_inlined_subroutine);
TheCU.addDIEEntry(*ScopeDIE, dwarf::DW_AT_abstract_origin, *OriginDIE);
- attachRangesOrLowHighPC(TheCU, *ScopeDIE, Scope->getRanges());
+ TheCU.attachRangesOrLowHighPC(*ScopeDIE, Scope->getRanges());
// Add the call site information to the DIE.
DILocation DL(Scope->getInlinedAt());
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index d047322b995..d522455a4e5 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -518,9 +518,6 @@ class DwarfDebug : public AsmPrinterHandler {
LabelsAfterInsn.insert(std::make_pair(MI, nullptr));
}
- void attachRangesOrLowHighPC(DwarfCompileUnit &Unit, DIE &D,
- const SmallVectorImpl<InsnRange> &Ranges);
-
public:
//===--------------------------------------------------------------------===//
// Main entry points.
OpenPOWER on IntegriCloud