[BOLT][NFC] Const-ify getDynamicRelocationAt

Reviewed By: #bolt, maksfb

Differential Revision: https://reviews.llvm.org/D152662
This commit is contained in:
Amir Ayupov
2023-06-12 09:54:42 -07:00
parent a9e0321ffe
commit 702fe36b70
2 changed files with 4 additions and 3 deletions

View File

@@ -2100,8 +2100,9 @@ const Relocation *BinaryContext::getRelocationAt(uint64_t Address) const {
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;