[PATCH] D148946: [BOLT] Remove unsupported ELF format reloc handling
Nathan Sidwell via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 23 10:10:01 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5b9f0309d653: [BOLT] Remove unsupported ELF type reloc handling (authored by urnathan).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148946/new/
https://reviews.llvm.org/D148946
Files:
bolt/lib/Rewrite/RewriteInstance.cpp
Index: bolt/lib/Rewrite/RewriteInstance.cpp
===================================================================
--- bolt/lib/Rewrite/RewriteInstance.cpp
+++ bolt/lib/Rewrite/RewriteInstance.cpp
@@ -1919,14 +1919,7 @@
int64_t getRelocationAddend(const ELFObjectFileBase *Obj,
const RelocationRef &Rel) {
- if (auto *ELF32LE = dyn_cast<ELF32LEObjectFile>(Obj))
- return getRelocationAddend(ELF32LE, Rel);
- if (auto *ELF64LE = dyn_cast<ELF64LEObjectFile>(Obj))
- return getRelocationAddend(ELF64LE, Rel);
- if (auto *ELF32BE = dyn_cast<ELF32BEObjectFile>(Obj))
- return getRelocationAddend(ELF32BE, Rel);
- auto *ELF64BE = cast<ELF64BEObjectFile>(Obj);
- return getRelocationAddend(ELF64BE, Rel);
+ return getRelocationAddend(cast<ELF64LEObjectFile>(Obj), Rel);
}
template <typename ELFT>
@@ -1953,14 +1946,7 @@
uint32_t getRelocationSymbol(const ELFObjectFileBase *Obj,
const RelocationRef &Rel) {
- if (auto *ELF32LE = dyn_cast<ELF32LEObjectFile>(Obj))
- return getRelocationSymbol(ELF32LE, Rel);
- if (auto *ELF64LE = dyn_cast<ELF64LEObjectFile>(Obj))
- return getRelocationSymbol(ELF64LE, Rel);
- if (auto *ELF32BE = dyn_cast<ELF32BEObjectFile>(Obj))
- return getRelocationSymbol(ELF32BE, Rel);
- auto *ELF64BE = cast<ELF64BEObjectFile>(Obj);
- return getRelocationSymbol(ELF64BE, Rel);
+ return getRelocationSymbol(cast<ELF64LEObjectFile>(Obj), Rel);
}
} // anonymous namespace
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148946.516186.patch
Type: text/x-patch
Size: 1484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230423/d3c57b64/attachment.bin>
More information about the llvm-commits
mailing list