[cfe-commits] r41435 - /cfe/trunk/CodeGen/CGExprScalar.cpp
Chris Lattner
sabre at nondot.org
Sun Aug 26 00:08:41 PDT 2007
Author: lattner
Date: Sun Aug 26 02:08:39 2007
New Revision: 41435
URL: http://llvm.org/viewvc/llvm-project?rev=41435&view=rev
Log:
remove uses of EmitConversion
Modified:
cfe/trunk/CodeGen/CGExprScalar.cpp
Modified: cfe/trunk/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGExprScalar.cpp?rev=41435&r1=41434&r2=41435&view=diff
==============================================================================
--- cfe/trunk/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/CodeGen/CGExprScalar.cpp Sun Aug 26 02:08:39 2007
@@ -511,14 +511,13 @@
// FIXME: it's possible for the computation type to be complex if the RHS
// is complex. Handle this!
- OpInfo.LHS = CGF.EmitConversion(RValue::get(OpInfo.LHS), LHSTy,
- ComputeType).getVal();
+ OpInfo.LHS = EmitScalarConversion(OpInfo.LHS, LHSTy, ComputeType);
// Do not merge types for -= where the LHS is a pointer.
if (E->getOpcode() != BinaryOperator::SubAssign ||
!E->getLHS()->getType()->isPointerType()) {
- OpInfo.RHS = CGF.EmitConversion(RValue::get(OpInfo.RHS), RHSTy,
- ComputeType).getVal();
+ // FIXME: the computation type may be complex.
+ OpInfo.RHS = EmitScalarConversion(OpInfo.RHS, RHSTy, ComputeType);
}
OpInfo.Ty = ComputeType;
OpInfo.E = E;
@@ -527,7 +526,7 @@
Value *Result = (this->*Func)(OpInfo);
// Truncate the result back to the LHS type.
- Result = CGF.EmitConversion(RValue::get(Result), ComputeType, LHSTy).getVal();
+ Result = EmitScalarConversion(Result, ComputeType, LHSTy);
// Store the result value into the LHS lvalue.
CGF.EmitStoreThroughLValue(RValue::get(Result), LHSLV, E->getType());
More information about the cfe-commits
mailing list