summaryrefslogtreecommitdiffstats
path: root/clang/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
commit55e1fbc848c0d2f3660251a9b6ef19beff512ac8 (patch)
tree02dc96d6f2b1cfb27dc2fe4c014560a319807cec /clang/lib/CodeGen/CGCall.cpp
parent8ca6622e9aff0e8c4296f0bb5187e659725dfa52 (diff)
downloadbcm5719-llvm-55e1fbc848c0d2f3660251a9b6ef19beff512ac8.tar.gz
bcm5719-llvm-55e1fbc848c0d2f3660251a9b6ef19beff512ac8.zip
LValue carries a type now, so simplify the main EmitLoad/Store APIs
by removing the redundant type parameter. llvm-svn: 133860
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 712ec62bd40..ead21624212 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud