diff options
author | John McCall <rjmccall@apple.com> | 2012-07-31 00:33:55 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-07-31 00:33:55 +0000 |
commit | bd9b65ae534cb11aa39737aa43ab82bb29e078f6 (patch) | |
tree | 63c2cf737aaa60133a690edd7a728e9091edf612 /lib/CodeGen/CGVTables.cpp | |
parent | f0324d33967f28758f7243c7bb1a469c5a0394b6 (diff) |
Don't crash *or* insert a bogus autorelease when emitting a
this-adjustment thunk in ARC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161014 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVTables.cpp')
-rw-r--r-- | lib/CodeGen/CGVTables.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp index 3c0dd5d56b..cdaa26a2ba 100644 --- a/lib/CodeGen/CGVTables.cpp +++ b/lib/CodeGen/CGVTables.cpp @@ -387,6 +387,9 @@ void CodeGenFunction::GenerateThunk(llvm::Function *Fn, if (!ResultType->isVoidType() && Slot.isNull()) CGM.getCXXABI().EmitReturnFromThunk(*this, RV, ResultType); + // Disable the final ARC autorelease. + AutoreleaseResult = false; + FinishFunction(); // Set the right linkage. |