aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-10-16 16:34:08 +0000
committerJohn McCall <rjmccall@apple.com>2010-10-16 16:34:08 +0000
commitfd186ac63b427ed65bf5972ef225961afe7893ff (patch)
treec2a8ede3374b1356493789b0ec1f6d6b9dc7ee41 /lib/CodeGen/CGObjCMac.cpp
parent67f94b8ce594d60e53c3456e36be9b4621700a2d (diff)
Coding by inspection has its problems.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116672 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r--lib/CodeGen/CGObjCMac.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index acb3ecebd6..72953ce924 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -6167,6 +6167,8 @@ void CGObjCNonFragileABIMac::EmitThrowStmt(CodeGen::CodeGenFunction &CGF,
const ObjCAtThrowStmt &S) {
if (const Expr *ThrowExpr = S.getThrowExpr()) {
llvm::Value *Exception = CGF.EmitScalarExpr(ThrowExpr);
+ Exception = CGF.Builder.CreateBitCast(Exception, ObjCTypes.ObjectPtrTy,
+ "tmp");
llvm::Value *Args[] = { Exception };
CGF.EmitCallOrInvoke(ObjCTypes.getExceptionThrowFn(),
Args, Args+1)