[cfe-commits] r116672 - in /cfe/trunk: lib/CodeGen/CGObjCMac.cpp test/CodeGenObjC/exceptions-nonfragile.m
John McCall
rjmccall at apple.com
Sat Oct 16 09:34:08 PDT 2010
Author: rjmccall
Date: Sat Oct 16 11:34:08 2010
New Revision: 116672
URL: http://llvm.org/viewvc/llvm-project?rev=116672&view=rev
Log:
Coding by inspection has its problems.
Modified:
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
cfe/trunk/test/CodeGenObjC/exceptions-nonfragile.m
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=116672&r1=116671&r2=116672&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Sat Oct 16 11:34:08 2010
@@ -6167,6 +6167,8 @@
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)
Modified: cfe/trunk/test/CodeGenObjC/exceptions-nonfragile.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/exceptions-nonfragile.m?rev=116672&r1=116671&r2=116672&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/exceptions-nonfragile.m (original)
+++ cfe/trunk/test/CodeGenObjC/exceptions-nonfragile.m Sat Oct 16 11:34:08 2010
@@ -11,3 +11,7 @@
@throw;
}
}
+
+void throwing() {
+ @throw(@"error!");
+}
More information about the cfe-commits
mailing list