start splitting out aggregate value computation from EmitExpr into EmitAggExpr.
aggregate value and scalar expression computation are very different, this
gets them away from each other. This causes a temporary regression on some
complex number examples.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41014 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CodeGenFunction.h b/CodeGen/CodeGenFunction.h
index 5cebb53..314896a 100644
--- a/CodeGen/CodeGenFunction.h
+++ b/CodeGen/CodeGenFunction.h
@@ -336,7 +336,7 @@
LValue EmitOCUVectorElementExpr(const OCUVectorElementExpr *E);
//===--------------------------------------------------------------------===//
- // Expression Emission
+ // Scalar Expression Emission
//===--------------------------------------------------------------------===//
void EmitCompoundAssignmentOperands(const CompoundAssignOperator *CAO,
@@ -344,7 +344,6 @@
RValue EmitCompoundAssignmentResult(const CompoundAssignOperator *E,
LValue LHSLV, RValue ResV);
-
RValue EmitExpr(const Expr *E);
RValue EmitIntegerLiteral(const IntegerLiteral *E);
RValue EmitFloatingLiteral(const FloatingLiteral *E);
@@ -396,6 +395,36 @@
// Conditional Operator.
RValue EmitConditionalOperator(const ConditionalOperator *E);
RValue EmitChooseExpr(const ChooseExpr *E);
+
+ //===--------------------------------------------------------------------===//
+ // Aggregate Expression Emission
+ //===--------------------------------------------------------------------===//
+
+ void EmitAggregateCopy(llvm::Value *DestPtr, llvm::Value *SrcPtr,
+ QualType EltTy);
+
+ /// EmitAggExpr - Emit the computation of the specified expression of
+ /// aggregate type. The result is computed into DestPtr. Note that if
+ /// DestPtr is null, the value of the aggregate expression is not needed.
+ void EmitAggExpr(const Expr *E, llvm::Value *DestPtr, bool VolatileDest);
+
+ /// EmitAggLoadOfLValue - Given an expression with aggregate type that
+ /// represents a value lvalue, this method emits the address of the lvalue,
+ /// then loads the result into DestPtr.
+ void EmitAggLoadOfLValue(const Expr *E, llvm::Value *DestPtr, bool VolDest);
+
+
+
+ // Binary Operators.
+ void EmitAggBinaryOperator(const BinaryOperator *E,
+ llvm::Value *DestPtr, bool VolatileDest);
+
+
+ void EmitAggBinaryAssign(const BinaryOperator *E, llvm::Value *DestPtr,
+ bool VolatileDest);
+
+ void EmitAggConditionalOperator(const ConditionalOperator *E,
+ llvm::Value *DestPtr, bool VolatileDest);
};
} // end namespace CodeGen
} // end namespace clang