]> granicus.if.org Git - clang/commitdiff
Implement code generation of ChooseExpr for aggregate types.
authorAnders Carlsson <andersca@mac.com>
Wed, 8 Jul 2009 18:33:14 +0000 (18:33 +0000)
committerAnders Carlsson <andersca@mac.com>
Wed, 8 Jul 2009 18:33:14 +0000 (18:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75021 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExprAgg.cpp

index 3898d1644780af1b5667fc636b7317a4cc7dedd1..46ccdd8a7d33bd4bcecb8b0987cad18ff0ffc194 100644 (file)
@@ -102,6 +102,7 @@ public:
   void VisitObjCKVCRefExpr(ObjCKVCRefExpr *E);
   
   void VisitConditionalOperator(const ConditionalOperator *CO);
+  void VisitChooseExpr(const ChooseExpr *CE);
   void VisitInitListExpr(InitListExpr *E);
   void VisitCXXDefaultArgExpr(CXXDefaultArgExpr *DAE) {
     Visit(DAE->getExpr());
@@ -295,6 +296,10 @@ void AggExprEmitter::VisitConditionalOperator(const ConditionalOperator *E) {
   CGF.EmitBlock(ContBlock);
 }
 
+void AggExprEmitter::VisitChooseExpr(const ChooseExpr *CE) {
+  Visit(CE->getChosenSubExpr(CGF.getContext()));
+}
+
 void AggExprEmitter::VisitVAArgExpr(VAArgExpr *VE) {
   llvm::Value *ArgValue = CGF.EmitVAListRef(VE->getSubExpr());
   llvm::Value *ArgPtr = CGF.EmitVAArg(ArgValue, VE->getType());