diff options
author | John McCall <rjmccall@apple.com> | 2010-07-21 06:45:54 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-07-21 06:45:54 +0000 |
commit | df054dbc15c19e38e8d5b60c51b6e601f502bc3e (patch) | |
tree | f8b78c4bc37cf980ae73e2605f92c8cd402a1b43 /lib/CodeGen/CGTemporaries.cpp | |
parent | 45483b4e0c129bdba43eaf8b22d23efa8dd8b9bc (diff) |
Code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGTemporaries.cpp')
-rw-r--r-- | lib/CodeGen/CGTemporaries.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/CodeGen/CGTemporaries.cpp b/lib/CodeGen/CGTemporaries.cpp index 39358937f8..018eb5f5c6 100644 --- a/lib/CodeGen/CGTemporaries.cpp +++ b/lib/CodeGen/CGTemporaries.cpp @@ -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()); } |