[cfe-commits] r116656 - in /cfe/trunk: lib/CodeGen/CGObjCMac.cpp test/CodeGenObjC/method-signatures.m

Daniel Dunbar daniel at zuster.org
Fri Oct 15 21:08:16 PDT 2010


Author: ddunbar
Date: Fri Oct 15 23:08:16 2010
New Revision: 116656

URL: http://llvm.org/viewvc/llvm-project?rev=116656&view=rev
Log:
IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don't
generate unnecessary %al clear on x86_64.

Added:
    cfe/trunk/test/CodeGenObjC/method-signatures.m
Modified:
    cfe/trunk/lib/CodeGen/CGObjCMac.cpp

Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=116656&r1=116655&r2=116656&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Fri Oct 15 23:08:16 2010
@@ -462,7 +462,7 @@
     // void objc_exception_rethrow(void)
     std::vector<const llvm::Type*> Args;
     llvm::FunctionType *FTy =
-      llvm::FunctionType::get(llvm::Type::getVoidTy(VMContext), Args, true);
+      llvm::FunctionType::get(llvm::Type::getVoidTy(VMContext), Args, false);
     return CGM.CreateRuntimeFunction(FTy, "objc_exception_rethrow");
   }
   

Added: cfe/trunk/test/CodeGenObjC/method-signatures.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/method-signatures.m?rev=116656&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/method-signatures.m (added)
+++ cfe/trunk/test/CodeGenObjC/method-signatures.m Fri Oct 15 23:08:16 2010
@@ -0,0 +1,14 @@
+// Check method signatures for synthesized runtime functions.
+//
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 \
+// RUN:    -fexceptions -fobjc-nonfragile-abi2 -emit-llvm -o %t %s
+// RUN: FileCheck < %t %s
+
+// CHECK: declare void @objc_exception_rethrow()
+void f1(void);
+void f0() {
+  @try {
+    f1();
+  } @finally {
+  }
+}





More information about the cfe-commits mailing list