summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-05-15 00:13:29 +0000
committerDouglas Gregor <dgregor@apple.com>2010-05-15 00:13:29 +0000
commit222cf0efbc174528022b6d51300247ae170a8b6d (patch)
treed15badb9890db68a222bb3bc0f9b8cba2853d19e /clang/lib/Sema/SemaObjCProperty.cpp
parent36d4d1541c49843e062a5c64d2fd65b9e9b98ac7 (diff)
downloadbcm5719-llvm-222cf0efbc174528022b6d51300247ae170a8b6d.tar.gz
bcm5719-llvm-222cf0efbc174528022b6d51300247ae170a8b6d.zip
Recognize when the named return value optimization applies in a
"return" statement and mark the corresponding CXXConstructExpr as elidable. Teach CodeGen that eliding a temporary is different from eliding an object construction. This is just a baby step toward NRVO. llvm-svn: 103849
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index a2aef20f658..002c39b6409 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/lib/Sema/SemaObjCProperty.cpp
@@ -445,8 +445,9 @@ Sema::DeclPtrTy Sema::ActOnPropertyImplDecl(Scope *S,
SelfExpr, true, true);
OwningExprResult Res =
PerformCopyInitialization(InitializedEntity::InitializeResult(
- SourceLocation(),
- getterMethod->getResultType()),
+ SourceLocation(),
+ getterMethod->getResultType(),
+ /*NRVO=*/false),
SourceLocation(),
Owned(IvarRefExpr));
if (!Res.isInvalid()) {
OpenPOWER on IntegriCloud