summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-07-22 21:42:46 +0000
committerJuergen Ributzka <juergen@apple.com>2014-07-22 21:42:46 +0000
commit175b78b02e99b9d9d1299e0ab1fee9ef689f7ce7 (patch)
tree14981a9c8c7d99c9b3d50ffc53bcdd4f54eed646 /llvm/lib/ExecutionEngine
parent8c714213d5fd311541962580b7d7d9dd40fc788b (diff)
downloadbcm5719-llvm-175b78b02e99b9d9d1299e0ab1fee9ef689f7ce7.tar.gz
bcm5719-llvm-175b78b02e99b9d9d1299e0ab1fee9ef689f7ce7.zip
[RuntimeDyld] Change the return type of decodeAddend to match the storage type.
llvm-svn: 213686
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp6
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
index 58fb51557c9..ba7c7cb9240 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
@@ -27,9 +27,9 @@ using namespace llvm::object;
namespace llvm {
-uint64_t RuntimeDyldMachO::decodeAddend(uint8_t *LocalAddress, unsigned NumBytes,
- uint32_t RelType) const {
- uint64_t Addend = 0;
+int64_t RuntimeDyldMachO::decodeAddend(uint8_t *LocalAddress, unsigned NumBytes,
+ uint32_t RelType) const {
+ int64_t Addend = 0;
memcpy(&Addend, LocalAddress, NumBytes);
return Addend;
}
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
index 7d1dc0263db..ecbbf828251 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
@@ -52,8 +52,8 @@ protected:
RuntimeDyldMachO(RTDyldMemoryManager *mm) : RuntimeDyldImpl(mm) {}
/// Extract the addend encoded in the instruction.
- uint64_t decodeAddend(uint8_t *LocalAddress, unsigned NumBytes,
- uint32_t RelType) const;
+ int64_t decodeAddend(uint8_t *LocalAddress, unsigned NumBytes,
+ uint32_t RelType) const;
/// Construct a RelocationValueRef representing the relocation target.
/// For Symbols in known sections, this will return a RelocationValueRef
@@ -138,7 +138,7 @@ protected:
uint8_t *LocalAddress = Section.Address + Offset;
unsigned NumBytes = 1 << Size;
uint32_t RelType = Obj.getAnyRelocationType(RelInfo);
- uint64_t Addend = impl().decodeAddend(LocalAddress, NumBytes, RelType);
+ int64_t Addend = impl().decodeAddend(LocalAddress, NumBytes, RelType);
return RelocationEntry(SectionID, Offset, RelType, Addend, IsPCRel, Size);
}
OpenPOWER on IntegriCloud