summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index b5834e68e53..70c19938877 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -121,6 +121,11 @@ void CodeGenFunction::StartObjCMethod(const ObjCMethodDecl *OMD) {
FnRetTy = OMD->getResultType();
CurFuncDecl = OMD;
+ ReturnBlock = llvm::BasicBlock::Create("return", CurFn);
+ ReturnValue = 0;
+ if (!FnRetTy->isVoidType())
+ ReturnValue = CreateTempAlloca(ConvertType(FnRetTy), "retval");
+
Builder.SetInsertPoint(EntryBB);
// Emit allocs for param decls. Give the LLVM Argument nodes names.
OpenPOWER on IntegriCloud