]> granicus.if.org Git - clang/commitdiff
Code simplification.
authorJohn McCall <rjmccall@apple.com>
Wed, 21 Jul 2010 06:45:54 +0000 (06:45 +0000)
committerJohn McCall <rjmccall@apple.com>
Wed, 21 Jul 2010 06:45:54 +0000 (06:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108996 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGTemporaries.cpp

index 39358937f8c4d0043b958405a61e6b8a89566cd7..018eb5f5c67b830ad0c402802f7e94560586fcd2 100644 (file)
@@ -80,23 +80,13 @@ CodeGenFunction::EmitCXXExprWithTemporaries(const CXXExprWithTemporaries *E,
                                             llvm::Value *AggLoc,
                                             bool IsAggLocVolatile,
                                             bool IsInitializer) {
-  RValue RV;
-  {
-    RunCleanupsScope Scope(*this);
-
-    RV = EmitAnyExpr(E->getSubExpr(), AggLoc, IsAggLocVolatile,
+  RunCleanupsScope Scope(*this);
+  return EmitAnyExpr(E->getSubExpr(), AggLoc, IsAggLocVolatile,
                      /*IgnoreResult=*/false, IsInitializer);
-  }
-  return RV;
 }
 
 LValue CodeGenFunction::EmitCXXExprWithTemporariesLValue(
                                               const CXXExprWithTemporaries *E) {
-  LValue LV;
-  {
-    RunCleanupsScope Scope(*this);
-
-    LV = EmitLValue(E->getSubExpr());
-  }
-  return LV;
+  RunCleanupsScope Scope(*this);
+  return EmitLValue(E->getSubExpr());
 }