]> granicus.if.org Git - clang/commitdiff
Minor simplification.
authorEli Friedman <eli.friedman@gmail.com>
Mon, 13 Apr 2009 21:41:57 +0000 (21:41 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Mon, 13 Apr 2009 21:41:57 +0000 (21:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68992 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGStmt.cpp

index ff9021012611b781c58bda3eef44536659cd7a57..9fd701419bdc92353c78ac0108a6297eaf83d9bc 100644 (file)
@@ -58,12 +58,7 @@ void CodeGenFunction::EmitStmt(const Stmt *S) {
     // Must be an expression in a stmt context.  Emit the value (to get
     // side-effects) and ignore the result.
     if (const Expr *E = dyn_cast<Expr>(S)) {
-      if (!hasAggregateLLVMType(E->getType()))
-        EmitScalarExpr(E);
-      else if (E->getType()->isAnyComplexType())
-        EmitComplexExpr(E);
-      else
-        EmitAggExpr(E, 0, false);
+      EmitAnyExpr(E);
     } else {
       ErrorUnsupported(S, "statement");
     }