projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reapply part of r237975, "Fix Clang -Wmissing-override warning", except for DIContext...
[oota-llvm.git]
/
lib
/
ExecutionEngine
/
RuntimeDyld
/
RuntimeDyldELF.cpp
diff --git
a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
index 52db2c0f62a89ca6a55cbae2143aabb7076f932c..95421b35db5cf4c319340384a5a4bea35a0d2101 100644
(file)
--- a/
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ b/
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@
-104,11
+104,12
@@
void DyldELFObject<ELFT>::updateSymbolAddress(const SymbolRef &SymRef,
sym->st_value = static_cast<addr_type>(Addr);
}
sym->st_value = static_cast<addr_type>(Addr);
}
-class LoadedELFObjectInfo : public RuntimeDyld::LoadedObjectInfo {
+class LoadedELFObjectInfo
+ : public RuntimeDyld::LoadedObjectInfoHelper<LoadedELFObjectInfo> {
public:
LoadedELFObjectInfo(RuntimeDyldImpl &RTDyld, unsigned BeginIdx,
unsigned EndIdx)
public:
LoadedELFObjectInfo(RuntimeDyldImpl &RTDyld, unsigned BeginIdx,
unsigned EndIdx)
-
: RuntimeDyld::LoadedObjectInfo
(RTDyld, BeginIdx, EndIdx) {}
+
: LoadedObjectInfoHelper
(RTDyld, BeginIdx, EndIdx) {}
OwningBinary<ObjectFile>
getObjectForDebug(const ObjectFile &Obj) const override;
OwningBinary<ObjectFile>
getObjectForDebug(const ObjectFile &Obj) const override;
@@
-249,7
+250,7
@@
void RuntimeDyldELF::resolveX86_64Relocation(const SectionEntry &Section,
case ELF::R_X86_64_PC32: {
uint64_t FinalAddress = Section.LoadAddress + Offset;
int64_t RealOffset = Value + Addend - FinalAddress;
case ELF::R_X86_64_PC32: {
uint64_t FinalAddress = Section.LoadAddress + Offset;
int64_t RealOffset = Value + Addend - FinalAddress;
- assert(
RealOffset <= INT32_MAX && RealOffset >= INT32_MIN
);
+ assert(
isInt<32>(RealOffset)
);
int32_t TruncOffset = (RealOffset & 0xFFFFFFFF);
support::ulittle32_t::ref(Section.Address + Offset) = TruncOffset;
break;
int32_t TruncOffset = (RealOffset & 0xFFFFFFFF);
support::ulittle32_t::ref(Section.Address + Offset) = TruncOffset;
break;
@@
-322,8
+323,7
@@
void RuntimeDyldELF::resolveAArch64Relocation(const SectionEntry &Section,
uint64_t BranchImm = Value + Addend - FinalAddress;
// "Check that -2^27 <= result < 2^27".
uint64_t BranchImm = Value + Addend - FinalAddress;
// "Check that -2^27 <= result < 2^27".
- assert(-(1LL << 27) <= static_cast<int64_t>(BranchImm) &&
- static_cast<int64_t>(BranchImm) < (1LL << 27));
+ assert(isInt<28>(BranchImm));
// AArch64 code is emitted with .rela relocations. The data already in any
// bits affected by the relocation on entry is garbage.
// AArch64 code is emitted with .rela relocations. The data already in any
// bits affected by the relocation on entry is garbage.
@@
-386,9
+386,7
@@
void RuntimeDyldELF::resolveAArch64Relocation(const SectionEntry &Section,
((Value + Addend) & ~0xfffULL) - (FinalAddress & ~0xfffULL);
// Check that -2^32 <= X < 2^32
((Value + Addend) & ~0xfffULL) - (FinalAddress & ~0xfffULL);
// Check that -2^32 <= X < 2^32
- assert(static_cast<int64_t>(Result) >= (-1LL << 32) &&
- static_cast<int64_t>(Result) < (1LL << 32) &&
- "overflow check failed for relocation");
+ assert(isInt<33>(Result) && "overflow check failed for relocation");
// AArch64 code is emitted with .rela relocations. The data already in any
// bits affected by the relocation on entry is garbage.
// AArch64 code is emitted with .rela relocations. The data already in any
// bits affected by the relocation on entry is garbage.