summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfFile.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-25 18:35:57 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-25 18:35:57 +0000
commit5410b5acda1c8a9726d008a46b382eaa83a52443 (patch)
tree2f503c3439e268fd78b351c9c2186c84277655a1 /lib/CodeGen/AsmPrinter/DwarfFile.cpp
parentd86dbccfeff224e09d927805abeb28690287f472 (diff)
downloadllvm-5410b5acda1c8a9726d008a46b382eaa83a52443.tar.gz
llvm-5410b5acda1c8a9726d008a46b382eaa83a52443.tar.bz2
llvm-5410b5acda1c8a9726d008a46b382eaa83a52443.tar.xz
Return DIE by reference instead of pointer from DwarfUnit::getUnitDie
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfFile.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfFile.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/lib/CodeGen/AsmPrinter/DwarfFile.cpp
index 06349358dd..131d7fb814 100644
--- a/lib/CodeGen/AsmPrinter/DwarfFile.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfFile.cpp
@@ -75,7 +75,7 @@ void DwarfFile::addUnit(std::unique_ptr<DwarfUnit> U) {
// the abbreviations going into ASection.
void DwarfFile::emitUnits(DwarfDebug *DD, const MCSymbol *ASectionSym) {
for (const auto &TheU : CUs) {
- DIE *Die = TheU->getUnitDie();
+ DIE &Die = TheU->getUnitDie();
const MCSection *USection = TheU->getSection();
Asm->OutStreamer.SwitchSection(USection);
@@ -84,11 +84,11 @@ void DwarfFile::emitUnits(DwarfDebug *DD, const MCSymbol *ASectionSym) {
// Emit size of content not including length itself
Asm->OutStreamer.AddComment("Length of Unit");
- Asm->EmitInt32(TheU->getHeaderSize() + Die->getSize());
+ Asm->EmitInt32(TheU->getHeaderSize() + Die.getSize());
TheU->emitHeader(ASectionSym);
- DD->emitDIE(*Die);
+ DD->emitDIE(Die);
Asm->OutStreamer.EmitLabel(TheU->getLabelEnd());
}
}
@@ -108,7 +108,7 @@ void DwarfFile::computeSizeAndOffsets() {
// EndOffset here is CU-relative, after laying out
// all of the CU DIE.
- unsigned EndOffset = computeSizeAndOffset(*TheU->getUnitDie(), Offset);
+ unsigned EndOffset = computeSizeAndOffset(TheU->getUnitDie(), Offset);
SecOffset += EndOffset;
}
}