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 | 9ac0a04b297805d2dbc729baed7641934bbb8db4 (patch) | |
| tree | 23b18f8efc7c752d731b1482c7a98cd201f14a5d /clang/lib/CodeGen | |
| parent | 3974a80307d42545390084b7c2fbf5ff6390ec60 (diff) | |
| download | bcm5719-llvm-9ac0a04b297805d2dbc729baed7641934bbb8db4.tar.gz bcm5719-llvm-9ac0a04b297805d2dbc729baed7641934bbb8db4.zip | |
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).
llvm-svn: 91335
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index d847cea3894..fb920f0b09e 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/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"); |

