diff options
author | Lang Hames <lhames@gmail.com> | 2022-01-06 15:18:40 +1100 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2022-01-06 15:20:21 +1100 |
commit | c5965a411c635106a47738b8d2e24db822b7416f (patch) | |
tree | 985dc2dafd3e5ccf69ed3f4511980c9929d605a1 /llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp | |
parent | aab62aab043162a03e2693dca1be2194bccdeee4 (diff) | |
download | llvm-c5965a411c635106a47738b8d2e24db822b7416f.zip llvm-c5965a411c635106a47738b8d2e24db822b7416f.tar.gz llvm-c5965a411c635106a47738b8d2e24db822b7416f.tar.bz2 |
Revert "[JITLink] Update JITLink to use ExecutorAddr rather than..."
This reverts commit 133f86e95492b2a00b944e070878424cfa73f87c while I investigate
the bot failures at https://lab.llvm.org/buildbot#builders/186/builds/3370.
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp index 7a71d2f..f427271 100644 --- a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp @@ -410,7 +410,7 @@ Error addFunctionPointerRelocationsToCurrentSymbol(jitlink::Symbol &Sym, while (I < Content.size()) { MCInst Instr; uint64_t InstrSize = 0; - uint64_t InstrStart = SymAddress.getValue() + I; + uint64_t InstrStart = SymAddress + I; auto DecodeStatus = Disassembler.getInstruction( Instr, InstrSize, Content.drop_front(I), InstrStart, CommentStream); if (DecodeStatus != MCDisassembler::Success) { @@ -426,7 +426,7 @@ Error addFunctionPointerRelocationsToCurrentSymbol(jitlink::Symbol &Sym, // Check for a PC-relative address equal to the symbol itself. auto PCRelAddr = MIA.evaluateMemoryOperandAddress(Instr, &STI, InstrStart, InstrSize); - if (!PCRelAddr || *PCRelAddr != SymAddress.getValue()) + if (!PCRelAddr.hasValue() || PCRelAddr.getValue() != SymAddress) continue; auto RelocOffInInstr = @@ -438,8 +438,8 @@ Error addFunctionPointerRelocationsToCurrentSymbol(jitlink::Symbol &Sym, continue; } - auto RelocOffInBlock = orc::ExecutorAddr(InstrStart) + *RelocOffInInstr - - SymAddress + Sym.getOffset(); + auto RelocOffInBlock = + InstrStart + *RelocOffInInstr - SymAddress + Sym.getOffset(); if (ExistingRelocations.contains(RelocOffInBlock)) continue; |