From d2ed5be8152a1fdeab9527d9b59694da72e53872 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 14 Dec 2018 07:46:58 +0000 Subject: [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 --- llvm/lib/XRay/InstrumentationMap.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'llvm/lib/XRay/InstrumentationMap.cpp') 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 &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(ObjFile)) - return ELFObj->getELFFile()->getRelrRelocationType(); + return ELFObj->getELFFile()->getRelativeRelocationType(); else if (const auto *ELFObj = dyn_cast(ObjFile)) - return ELFObj->getELFFile()->getRelrRelocationType(); + return ELFObj->getELFFile()->getRelativeRelocationType(); else if (const auto *ELFObj = dyn_cast(ObjFile)) - return ELFObj->getELFFile()->getRelrRelocationType(); + return ELFObj->getELFFile()->getRelativeRelocationType(); else if (const auto *ELFObj = dyn_cast(ObjFile)) - return ELFObj->getELFFile()->getRelrRelocationType(); + return ELFObj->getELFFile()->getRelativeRelocationType(); else return static_cast(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}); -- cgit v1.2.3