[llvm] 233c243 - [dsymutil] Don't keep old abbreviations
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 6 20:02:07 PDT 2021
Author: Jonas Devlieghere
Date: 2021-04-06T19:50:17-07:00
New Revision: 233c24330b8e253c4a22053fb405cffb6da769d9
URL: https://github.com/llvm/llvm-project/commit/233c24330b8e253c4a22053fb405cffb6da769d9
DIFF: https://github.com/llvm/llvm-project/commit/233c24330b8e253c4a22053fb405cffb6da769d9.diff
LOG: [dsymutil] Don't keep old abbreviations
Don't keep the old abbreviations around. This code existed for
compatibility with dsymutil-classic.
Added:
Modified:
llvm/lib/DWARFLinker/DWARFLinker.cpp
Removed:
################################################################################
diff --git a/llvm/lib/DWARFLinker/DWARFLinker.cpp b/llvm/lib/DWARFLinker/DWARFLinker.cpp
index 6428598334c4..6fe3cbdc8836 100644
--- a/llvm/lib/DWARFLinker/DWARFLinker.cpp
+++ b/llvm/lib/DWARFLinker/DWARFLinker.cpp
@@ -1422,20 +1422,12 @@ DIE *DWARFLinker::DIECloner::cloneDIE(const DWARFDie &InputDIE,
Flags |= TF_SkipPC;
}
- bool Copied = false;
for (const auto &AttrSpec : Abbrev->attributes()) {
if (LLVM_LIKELY(!Update) &&
shouldSkipAttribute(AttrSpec, Die->getTag(), Info.InDebugMap,
Flags & TF_SkipPC, Flags & TF_InFunctionScope)) {
DWARFFormValue::skipValue(AttrSpec.Form, Data, &Offset,
U.getFormParams());
- // FIXME: dsymutil-classic keeps the old abbreviation around
- // even if it's not used. We can remove this (and the copyAbbrev
- // helper) as soon as bit-for-bit compatibility is not a goal anymore.
- if (!Copied) {
- copyAbbrev(*InputDIE.getAbbreviationDeclarationPtr(), Unit.hasODR());
- Copied = true;
- }
continue;
}
@@ -1931,21 +1923,6 @@ void DWARFLinker::patchFrameInfoForObject(const DWARFFile &File,
}
}
-void DWARFLinker::DIECloner::copyAbbrev(
- const DWARFAbbreviationDeclaration &Abbrev, bool HasODR) {
- DIEAbbrev Copy(dwarf::Tag(Abbrev.getTag()),
- dwarf::Form(Abbrev.hasChildren()));
-
- for (const auto &Attr : Abbrev.attributes()) {
- uint16_t Form = Attr.Form;
- if (HasODR && isODRAttribute(Attr.Attr))
- Form = dwarf::DW_FORM_ref_addr;
- Copy.AddAttribute(dwarf::Attribute(Attr.Attr), dwarf::Form(Form));
- }
-
- Linker.assignAbbrev(Copy);
-}
-
uint32_t DWARFLinker::DIECloner::hashFullyQualifiedName(DWARFDie DIE,
CompileUnit &U,
const DWARFFile &File,
More information about the llvm-commits
mailing list