diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-12-14 21:35:01 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-12-14 21:35:01 +0000 |
commit | 8c89ff9b0923083f4838d9c6fcf858e3aa311b40 (patch) | |
tree | 47b7cf6cb6160867f38deea54151353f5943951d /lib/CodeGen | |
parent | eb3f00c292c515a9576e2c1dee70985e550231f2 (diff) |
Patch to fix 32-bit @try failure with internal assertion when compiling
an Objective-C rethrow nested inside another try/catch block. (fixes radar 7466728).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91335 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index d847cea389..fb920f0b09 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -2541,8 +2541,11 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF, // through finally. CGF.PushCleanupBlock(FinallyBlock); - CGF.ObjCEHValueStack.push_back(0); - + if (CGF.ObjCEHValueStack.empty()) + CGF.ObjCEHValueStack.push_back(0); + // If This is a nested @try, caught exception is that of enclosing @try. + else + CGF.ObjCEHValueStack.push_back(CGF.ObjCEHValueStack.back()); // Allocate memory for the exception data and rethrow pointer. llvm::Value *ExceptionData = CGF.CreateTempAlloca(ObjCTypes.ExceptionDataTy, "exceptiondata.ptr"); |