[llvm] 1eade73 - [DebugInfo] Remove DwarfUnit::getDwarfVersion(). NFC.
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 02:09:36 PDT 2020
Author: Igor Kudrin
Date: 2020-08-07T15:55:44+07:00
New Revision: 1eade73d8b0d8a08e7f3a62856a1f2004a046efb
URL: https://github.com/llvm/llvm-project/commit/1eade73d8b0d8a08e7f3a62856a1f2004a046efb
DIFF: https://github.com/llvm/llvm-project/commit/1eade73d8b0d8a08e7f3a62856a1f2004a046efb.diff
LOG: [DebugInfo] Remove DwarfUnit::getDwarfVersion(). NFC.
This helper method was used only in one place, which can easily use the
direct call.
Differential revision: https://reviews.llvm.org/D85438
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 704fff246b6a..602b1bceddc3 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -1411,8 +1411,8 @@ void DwarfCompileUnit::addAddrTableBase() {
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());
}
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
index 8af0cdc538cd..18ad7e958c25 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
@@ -87,8 +87,6 @@ class DwarfUnit : public DIEUnit {
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(); }
More information about the llvm-commits
mailing list