summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2014-05-03 00:41:18 +0000
committerNick Lewycky <nicholas@mxc.ca>2014-05-03 00:41:18 +0000
commitd78f92fbb26b388b30192dfa88fd614db35dbbad (patch)
tree3e07496fe683abf375a92778a2229b38ba7cfd55 /clang/lib/Sema/TreeTransform.h
parente39ee215519e6189d56b345e21f2cee2ffeed3ab (diff)
downloadbcm5719-llvm-d78f92fbb26b388b30192dfa88fd614db35dbbad.tar.gz
bcm5719-llvm-d78f92fbb26b388b30192dfa88fd614db35dbbad.zip
Rewrite NRVO determination. Track NRVO candidates on the parser Scope and apply the NRVO candidate flag to all possible NRVO candidates here, and remove the flags in computeNRVO or upon template instantiation. A variable now has NRVO applied if and only if every return statement in that scope returns that variable. This is nearly optimal.
Performs NRVO roughly 7% more often in a bootstrap build of clang. Patch co-authored by Richard Smith. llvm-svn: 207890
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r--clang/lib/Sema/TreeTransform.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index f1138918825..46f97ee9f00 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -1187,7 +1187,7 @@ public:
/// By default, performs semantic analysis to build the new statement.
/// Subclasses may override this routine to provide different behavior.
StmtResult RebuildReturnStmt(SourceLocation ReturnLoc, Expr *Result) {
- return getSema().ActOnReturnStmt(ReturnLoc, Result);
+ return getSema().BuildReturnStmt(ReturnLoc, Result);
}
/// \brief Build a new declaration statement.
OpenPOWER on IntegriCloud