aboutsummaryrefslogtreecommitdiff
path: root/llvm/include/llvm/MC/MCInstrAnalysis.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/MC/MCInstrAnalysis.h')
-rw-r--r--llvm/include/llvm/MC/MCInstrAnalysis.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/include/llvm/MC/MCInstrAnalysis.h b/llvm/include/llvm/MC/MCInstrAnalysis.h
index 898ca47b13b8..632a7d8f820e 100644
--- a/llvm/include/llvm/MC/MCInstrAnalysis.h
+++ b/llvm/include/llvm/MC/MCInstrAnalysis.h
@@ -154,9 +154,14 @@ public:
/// Given an instruction tries to get the address of a memory operand. Returns
/// the address on success.
- virtual Optional<uint64_t> evaluateMemoryOperandAddress(const MCInst &Inst,
- uint64_t Addr,
- uint64_t Size) const;
+ virtual Optional<uint64_t>
+ evaluateMemoryOperandAddress(const MCInst &Inst, const MCSubtargetInfo *STI,
+ uint64_t Addr, uint64_t Size) const;
+
+ /// Given an instruction with a memory operand that could require relocation,
+ /// returns the offset within the instruction of that relocation.
+ virtual Optional<uint64_t>
+ getMemoryOperandRelocationOffset(const MCInst &Inst, uint64_t Size) const;
/// Returns (PLT virtual address, GOT virtual address) pairs for PLT entries.
virtual std::vector<std::pair<uint64_t, uint64_t>>