[PATCH] D152662: [BOLT][NFC] Const-ify getDynamicRelocationAt
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 12 09:55:32 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG702fe36b7067: [BOLT][NFC] Const-ify getDynamicRelocationAt (authored by Amir).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152662/new/
https://reviews.llvm.org/D152662
Files:
bolt/include/bolt/Core/BinaryContext.h
bolt/lib/Core/BinaryContext.cpp
Index: bolt/lib/Core/BinaryContext.cpp
===================================================================
--- bolt/lib/Core/BinaryContext.cpp
+++ bolt/lib/Core/BinaryContext.cpp
@@ -2100,8 +2100,9 @@
return Section->getRelocationAt(Address - Section->getAddress());
}
-const Relocation *BinaryContext::getDynamicRelocationAt(uint64_t Address) {
- ErrorOr<BinarySection &> Section = getSectionForAddress(Address);
+const Relocation *
+BinaryContext::getDynamicRelocationAt(uint64_t Address) const {
+ ErrorOr<const BinarySection &> Section = getSectionForAddress(Address);
if (!Section)
return nullptr;
Index: bolt/include/bolt/Core/BinaryContext.h
===================================================================
--- bolt/include/bolt/Core/BinaryContext.h
+++ bolt/include/bolt/Core/BinaryContext.h
@@ -1165,7 +1165,7 @@
/// Return a dynamic relocation registered at a given \p Address, or nullptr
/// if there is no dynamic relocation at such address.
- const Relocation *getDynamicRelocationAt(uint64_t Address);
+ const Relocation *getDynamicRelocationAt(uint64_t Address) const;
/// Remove registered relocation at a given \p Address.
bool removeRelocationAt(uint64_t Address);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152662.530562.patch
Type: text/x-patch
Size: 1222 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230612/56a0dc80/attachment.bin>
More information about the llvm-commits
mailing list