introduce a SGF::emitRValueAsSingleValue helper function to wrap a common

and repetitive pattern.


Swift SVN r12808
This commit is contained in:
Chris Lattner
2014-01-22 22:51:55 +00:00
parent 471f2a577e
commit 84f9919016
6 changed files with 36 additions and 42 deletions

View File

@@ -1419,8 +1419,7 @@ public:
{
Expr *ME = ep->getMatchExpr();
FullExpr scope(gen.Cleanups, CleanupLocation(ME));
testBool = gen.emitRValue(ME)
.getUnmanagedSingleValue(gen, ME);
testBool = gen.emitRValue(ME).getUnmanagedSingleValue(gen, ME);
}
// If the test succeeds, we move on to the next test; otherwise, we