diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-30 20:32:26 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-30 20:32:26 +0000 |
commit | 10fcac7b0768dfb1d9fb3030f2bb664ad8e4e65b (patch) | |
tree | 061af9263ce956b767a139713c0d8ab2862b06a2 /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp | |
parent | 391e53812a5ec4ad8ef8cc4b9a9b81b1a7caf762 (diff) | |
download | bcm5719-llvm-10fcac7b0768dfb1d9fb3030f2bb664ad8e4e65b.tar.gz bcm5719-llvm-10fcac7b0768dfb1d9fb3030f2bb664ad8e4e65b.zip |
Use ErrorOr in getRelocationAdress.
We can probably do better in this method, but this is an improvement and
enables further ErrorOr cleanups.
llvm-svn: 241114
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp index d4a680d749a..2ae14ac0fa8 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp @@ -97,9 +97,8 @@ void RuntimeDyldMachO::makeValueAddendPCRel(RelocationValueRef &Value, bool IsPCRel = Obj.getAnyRelocationPCRel(RelInfo); if (IsPCRel) { - uint64_t RelocAddr = 0; - RI->getAddress(RelocAddr); - Value.Offset += RelocAddr + OffsetToNextPC; + ErrorOr<uint64_t> RelocAddr = RI->getAddress(); + Value.Offset += *RelocAddr + OffsetToNextPC; } } |