From 6fd1b1802f5e748d2e8dfabeb03b62c0d65340ab Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 15 May 2010 06:01:05 +0000 Subject: Implement semantic analysis and an AST representation for the named return value optimization. Sema marks return statements with their NRVO candidates (which may or may not end up using the NRVO), then, at the end of a function body, computes and marks those variables that can be allocated into the return slot. I've checked this locally with some debugging statements (not committed), but there won't be any tests until CodeGen comes along. llvm-svn: 103865 --- clang/lib/CodeGen/CGObjC.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGObjC.cpp') diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index b3e9dc52513..df0263ee129 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -255,7 +255,8 @@ void CodeGenFunction::GenerateObjCGetter(ObjCImplementationDecl *IMP, if (PID->getGetterCXXConstructor()) { ReturnStmt *Stmt = new (getContext()) ReturnStmt(SourceLocation(), - PID->getGetterCXXConstructor()); + PID->getGetterCXXConstructor(), + 0); EmitReturnStmt(*Stmt); } else { -- cgit v1.2.3