[PATCH] D119192: [DWARF][codegen] Removed addLocalLabelAddress
Alexander Yermolovich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 9 11:59:02 PST 2022
ayermolo updated this revision to Diff 407235.
ayermolo added a comment.
updated diff, in light of landing other one first.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119192/new/
https://reviews.llvm.org/D119192
Files:
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
Index: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -163,11 +163,6 @@
void addLabelAddress(DIE &Die, dwarf::Attribute Attribute,
const MCSymbol *Label);
- /// addLocalLabelAddress - Add a dwarf label attribute data and value using
- /// DW_FORM_addr only.
- void addLocalLabelAddress(DIE &Die, dwarf::Attribute Attribute,
- const MCSymbol *Label);
-
DwarfCompileUnit &getCU() override { return *this; }
unsigned getOrCreateSourceID(const DIFile *File) override;
Index: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -71,8 +71,14 @@
DD->addArangeLabel(SymbolCU(this, Label));
// Don't use the address pool in non-fission or in the skeleton unit itself.
- if ((!DD->useSplitDwarf() || !Skeleton) && DD->getDwarfVersion() < 5)
- return addLocalLabelAddress(Die, Attribute, Label);
+ if ((!DD->useSplitDwarf() || !Skeleton) && DD->getDwarfVersion() < 5) {
+ if (Label)
+ addAttribute(Die, Attribute, dwarf::DW_FORM_addr, DIELabel(Label));
+ else
+ addAttribute(Die, Attribute, dwarf::DW_FORM_addr, DIEInteger(0));
+
+ return;
+ }
bool UseAddrOffsetFormOrExpressions =
DD->useAddrOffsetForm() || DD->useAddrOffsetExpressions();
@@ -105,15 +111,6 @@
DD->getAddressPool().getIndex(Base), Label, Base));
}
-void DwarfCompileUnit::addLocalLabelAddress(DIE &Die,
- dwarf::Attribute Attribute,
- const MCSymbol *Label) {
- if (Label)
- addAttribute(Die, Attribute, dwarf::DW_FORM_addr, DIELabel(Label));
- else
- addAttribute(Die, Attribute, dwarf::DW_FORM_addr, DIEInteger(0));
-}
-
unsigned DwarfCompileUnit::getOrCreateSourceID(const DIFile *File) {
// If we print assembly, we can't separate .file entries according to
// compile units. Thus all files will belong to the default compile unit.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119192.407235.patch
Type: text/x-patch
Size: 2280 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220209/ed0302e1/attachment.bin>
More information about the llvm-commits
mailing list