From 55e1fbc848c0d2f3660251a9b6ef19beff512ac8 Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 25 Jun 2011 02:11:03 +0000 Subject: LValue carries a type now, so simplify the main EmitLoad/Store APIs by removing the redundant type parameter. llvm-svn: 133860 --- clang/lib/CodeGen/CGExprAgg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CGExprAgg.cpp') diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 1cd196a0e48..99e95842eb7 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -588,7 +588,7 @@ AggExprEmitter::EmitInitializationToLValue(Expr* E, LValue LV) { EmitNullInitializationToLValue(LV); } else if (type->isReferenceType()) { RValue RV = CGF.EmitReferenceBindingToExpr(E, /*InitializedDecl=*/0); - CGF.EmitStoreThroughLValue(RV, LV, type); + CGF.EmitStoreThroughLValue(RV, LV); } else if (type->isAnyComplexType()) { CGF.EmitComplexExprIntoAddr(E, LV.getAddress(), false); } else if (CGF.hasAggregateLLVMType(type)) { @@ -597,7 +597,7 @@ AggExprEmitter::EmitInitializationToLValue(Expr* E, LValue LV) { } else if (LV.isSimple()) { CGF.EmitScalarInit(E, /*D=*/0, LV, /*Captured=*/false); } else { - CGF.EmitStoreThroughLValue(RValue::get(CGF.EmitScalarExpr(E)), LV, type); + CGF.EmitStoreThroughLValue(RValue::get(CGF.EmitScalarExpr(E)), LV); } } @@ -612,7 +612,7 @@ void AggExprEmitter::EmitNullInitializationToLValue(LValue lv) { if (!CGF.hasAggregateLLVMType(type)) { // For non-aggregates, we can store zero llvm::Value *null = llvm::Constant::getNullValue(CGF.ConvertType(type)); - CGF.EmitStoreThroughLValue(RValue::get(null), lv, type); + CGF.EmitStoreThroughLValue(RValue::get(null), lv); } else { // There's a potential optimization opportunity in combining // memsets; that would be easy for arrays, but relatively -- cgit v1.2.3