aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-06-25 02:11:03 +0000
committerJohn McCall <rjmccall@apple.com>2011-06-25 02:11:03 +0000
commit545d996ec5a3113f046944f11b27cc2d6cb055b4 (patch)
treee685c2dbd04eb819195efca9a0539719e02af5b5 /lib/CodeGen/CGCall.cpp
parent913dab2525cc705e5238023a446f5371fa411883 (diff)
LValue carries a type now, so simplify the main EmitLoad/Store APIs
by removing the redundant type parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133860 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 712ec62bd4..ead2162421 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -359,7 +359,7 @@ CodeGenFunction::ExpandTypeFromArgs(QualType Ty, LValue LV,
if (CodeGenFunction::hasAggregateLLVMType(FT)) {
AI = ExpandTypeFromArgs(FT, LV, AI);
} else {
- EmitStoreThroughLValue(RValue::get(AI), LV, FT);
+ EmitStoreThroughLValue(RValue::get(AI), LV);
++AI;
}
}
@@ -386,7 +386,7 @@ CodeGenFunction::ExpandTypeToArgs(QualType Ty, RValue RV,
if (CodeGenFunction::hasAggregateLLVMType(FT)) {
ExpandTypeToArgs(FT, RValue::getAggregate(LV.getAddress()), Args);
} else {
- RValue RV = EmitLoadOfLValue(LV, FT);
+ RValue RV = EmitLoadOfLValue(LV);
assert(RV.isScalar() &&
"Unexpected non-scalar rvalue during struct expansion.");
Args.push_back(RV.getScalarVal());
@@ -1329,8 +1329,7 @@ static void emitWriteback(CodeGenFunction &CGF,
// Perform the writeback.
QualType srcAddrType = writeback.AddressType;
CGF.EmitStoreThroughLValue(RValue::get(value),
- CGF.MakeAddrLValue(srcAddr, srcAddrType),
- srcAddrType);
+ CGF.MakeAddrLValue(srcAddr, srcAddrType));
// Jump to the continuation block.
if (!provablyNonNull)
@@ -1407,7 +1406,7 @@ static void emitWritebackArg(CodeGenFunction &CGF, CallArgList &args,
// Perform a copy if necessary.
if (shouldCopy) {
LValue srcLV = CGF.MakeAddrLValue(srcAddr, srcAddrType);
- RValue srcRV = CGF.EmitLoadOfLValue(srcLV, srcAddrType);
+ RValue srcRV = CGF.EmitLoadOfLValue(srcLV);
assert(srcRV.isScalar());
llvm::Value *src = srcRV.getScalarVal();