diff options
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 9c23ba4b1ee..ae1349fbd8a 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -892,10 +892,14 @@ CodeGenFunction::generateObjCGetterBody(const ObjCImplementationDecl *classImpl, // FIXME: We shouldn't need to get the function info here, the // runtime already should have computed it to build the function. + llvm::Instruction *CallInstruction; RValue RV = EmitCall(getTypes().arrangeFreeFunctionCall(propType, args, FunctionType::ExtInfo(), RequiredArgs::All), - getPropertyFn, ReturnValueSlot(), args); + getPropertyFn, ReturnValueSlot(), args, 0, + &CallInstruction); + if (llvm::CallInst *call = dyn_cast<llvm::CallInst>(CallInstruction)) + call->setTailCall(); // We need to fix the type here. Ivars with copy & retain are // always objects so we don't need to worry about complex or |