[llvm] 214fb43 - MCExpr: simplify evaluateAsRelocatableImpl after https://reviews.llvm.org/D156505

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 25 09:14:23 PDT 2025


Author: Fangrui Song
Date: 2025-03-25T09:14:17-07:00
New Revision: 214fb43cb671d89d0e2da6dde348c6ffc360d7f0

URL: https://github.com/llvm/llvm-project/commit/214fb43cb671d89d0e2da6dde348c6ffc360d7f0
DIFF: https://github.com/llvm/llvm-project/commit/214fb43cb671d89d0e2da6dde348c6ffc360d7f0.diff

LOG: MCExpr: simplify evaluateAsRelocatableImpl after https://reviews.llvm.org/D156505

Added: 
    

Modified: 
    llvm/lib/MC/MCExpr.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp
index b0efa07aff5a3..dd45a94ea892a 100644
--- a/llvm/lib/MC/MCExpr.cpp
+++ b/llvm/lib/MC/MCExpr.cpp
@@ -655,11 +655,7 @@ bool MCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
             Res);
 
       case MCBinaryExpr::Add:
-        return evaluateSymbolicAdd(
-            Asm, Addrs, InSet, LHSValue,
-            MCValue::get(RHSValue.getSymA(), RHSValue.getSymB(),
-                         RHSValue.getConstant(), RHSValue.getRefKind()),
-            Res);
+        return evaluateSymbolicAdd(Asm, Addrs, InSet, LHSValue, RHSValue, Res);
       }
     }
 


        


More information about the llvm-commits mailing list