[PATCH] D85438: [DebugInfo] Remove DwarfUnit::getDwarfVersion(). NFC.
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 6 08:53:36 PDT 2020
ikudrin created this revision.
ikudrin added reviewers: dblaikie, jhenderson.
ikudrin added projects: LLVM, debug-info.
Herald added a subscriber: hiraditya.
ikudrin requested review of this revision.
This helper method was used only in one place, which can easily use the direct call.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85438
Files:
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
Index: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
+++ llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
@@ -87,8 +87,6 @@
uint16_t getLanguage() const { return CUNode->getSourceLanguage(); }
const DICompileUnit *getCUNode() const { return CUNode; }
- uint16_t getDwarfVersion() const { return DD->getDwarfVersion(); }
-
/// Return true if this compile unit has something to write out.
bool hasContent() const { return getUnitDie().hasChildren(); }
Index: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -1411,8 +1411,8 @@
const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
MCSymbol *Label = DD->getAddressPool().getLabel();
addSectionLabel(getUnitDie(),
- getDwarfVersion() >= 5 ? dwarf::DW_AT_addr_base
- : dwarf::DW_AT_GNU_addr_base,
+ DD->getDwarfVersion() >= 5 ? dwarf::DW_AT_addr_base
+ : dwarf::DW_AT_GNU_addr_base,
Label, TLOF.getDwarfAddrSection()->getBeginSymbol());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85438.283626.patch
Type: text/x-patch
Size: 1336 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200806/acd4ed56/attachment.bin>
More information about the llvm-commits
mailing list