[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)
Benjamin Stott via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 7 08:37:19 PST 2025
================
@@ -1283,7 +1283,7 @@ EmitCompoundAssignLValue(const CompoundAssignOperator *E,
else
OpInfo.LHS = EmitComplexToComplexCast(LHSVal, LHSTy, OpInfo.Ty, Loc);
} else {
- llvm::Value *LHSVal = CGF.EmitLoadOfScalar(LHS, Loc);
+ llvm::Value *LHSVal = CGF.EmitLoadOfLValue(LHS, Loc).getScalarVal();
----------------
BStott6 wrote:
I think it does make sense to replace it with EmitStoreThroughLValue, what do you think?
https://github.com/llvm/llvm-project/pull/166798
More information about the cfe-commits
mailing list