diff options
author | Fangrui Song <maskray@google.com> | 2018-12-14 07:46:58 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-12-14 07:46:58 +0000 |
commit | d2ed5be8152a1fdeab9527d9b59694da72e53872 (patch) | |
tree | 35c33b7f84911b4bd36f23d3bae36457ee77ee49 /llvm/lib/XRay/InstrumentationMap.cpp | |
parent | 13c9c054410ca504d5e0c50e7d3b68bcbb8e200b (diff) | |
download | bcm5719-llvm-d2ed5be8152a1fdeab9527d9b59694da72e53872.tar.gz bcm5719-llvm-d2ed5be8152a1fdeab9527d9b59694da72e53872.zip |
[Object] Rename getRelrRelocationType to getRelativeRelocationType
Summary:
The two utility functions were added in D47919 to support SHT_RELR.
However, these are just relative relocations types and are't
necessarily be named Relr.
Reviewers: phosek, dberris
Reviewed By: dberris
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D55691
llvm-svn: 349133
Diffstat (limited to 'llvm/lib/XRay/InstrumentationMap.cpp')
-rw-r--r-- | llvm/lib/XRay/InstrumentationMap.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/XRay/InstrumentationMap.cpp b/llvm/lib/XRay/InstrumentationMap.cpp index 336a54a1b1e..9f2b179486f 100644 --- a/llvm/lib/XRay/InstrumentationMap.cpp +++ b/llvm/lib/XRay/InstrumentationMap.cpp @@ -85,22 +85,22 @@ loadObj(StringRef Filename, object::OwningBinary<object::ObjectFile> &ObjFile, RelocMap Relocs; if (ObjFile.getBinary()->isELF()) { - uint32_t RelrRelocationType = [](object::ObjectFile *ObjFile) { + uint32_t RelativeRelocation = [](object::ObjectFile *ObjFile) { if (const auto *ELFObj = dyn_cast<object::ELF32LEObjectFile>(ObjFile)) - return ELFObj->getELFFile()->getRelrRelocationType(); + return ELFObj->getELFFile()->getRelativeRelocationType(); else if (const auto *ELFObj = dyn_cast<object::ELF32BEObjectFile>(ObjFile)) - return ELFObj->getELFFile()->getRelrRelocationType(); + return ELFObj->getELFFile()->getRelativeRelocationType(); else if (const auto *ELFObj = dyn_cast<object::ELF64LEObjectFile>(ObjFile)) - return ELFObj->getELFFile()->getRelrRelocationType(); + return ELFObj->getELFFile()->getRelativeRelocationType(); else if (const auto *ELFObj = dyn_cast<object::ELF64BEObjectFile>(ObjFile)) - return ELFObj->getELFFile()->getRelrRelocationType(); + return ELFObj->getELFFile()->getRelativeRelocationType(); else return static_cast<uint32_t>(0); }(ObjFile.getBinary()); for (const object::SectionRef &Section : Sections) { for (const object::RelocationRef &Reloc : Section.relocations()) { - if (Reloc.getType() != RelrRelocationType) + if (Reloc.getType() != RelativeRelocation) continue; if (auto AddendOrErr = object::ELFRelocationRef(Reloc).getAddend()) Relocs.insert({Reloc.getOffset(), *AddendOrErr}); |