[llvm] [BOLT][NFC] Add isRIPRel and isIndexed helpers (PR #91661)
Amir Ayupov via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 14:07:29 PDT 2024
================
@@ -1932,6 +1932,19 @@ class X86MCPlusBuilder : public MCPlusBuilder {
// = R_X86_64_PC32(Ln) + En - JT
// = R_X86_64_PC32(Ln + offsetof(En))
//
+ auto isRIPRel = [&](X86MemOperand &MO) {
+ // NB: DispExpr should be set
+ return MO.DispExpr != nullptr &&
----------------
aaupov wrote:
No, it's actually just moving forward because it's the one that's important :)
And judging by the fact that you noticed it, the change achieved its goal.
https://github.com/llvm/llvm-project/pull/91661
More information about the llvm-commits
mailing list