]> granicus.if.org Git - clang/commitdiff
IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don't
authorDaniel Dunbar <daniel@zuster.org>
Sat, 16 Oct 2010 04:08:16 +0000 (04:08 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 16 Oct 2010 04:08:16 +0000 (04:08 +0000)
generate unnecessary %al clear on x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116656 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCMac.cpp
test/CodeGenObjC/method-signatures.m [new file with mode: 0644]

index 8b3fd499b66286538dcdef377a288c9dda13ae5e..3440959408ea342bcadd5ab865e7f235c61b5a4f 100644 (file)
@@ -462,7 +462,7 @@ public:
     // 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");
   }
   
diff --git a/test/CodeGenObjC/method-signatures.m b/test/CodeGenObjC/method-signatures.m
new file mode 100644 (file)
index 0000000..b035709
--- /dev/null
@@ -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 {
+  }
+}