implement passing of complex and aggregates through call args.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41344 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CGComplexExpr.cpp b/CodeGen/CGComplexExpr.cpp
index 90bb078..1597f8e 100644
--- a/CodeGen/CGComplexExpr.cpp
+++ b/CodeGen/CGComplexExpr.cpp
@@ -314,3 +314,13 @@
return ComplexExprEmitter(*this).Visit(const_cast<Expr*>(E));
}
+/// EmitComplexExprIntoAddr - Emit the computation of the specified expression
+/// of complex type, storing into the specified Value*.
+void CodeGenFunction::EmitComplexExprIntoAddr(const Expr *E,
+ llvm::Value *DestAddr) {
+ assert(E && E->getType()->isComplexType() &&
+ "Invalid complex expression to emit");
+ ComplexExprEmitter Emitter(*this);
+ ComplexPairTy Val = Emitter.Visit(const_cast<Expr*>(E));
+ Emitter.EmitStoreOfComplex(Val, DestAddr, false);
+}