aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-10-16 04:08:16 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-10-16 04:08:16 +0000
commit338ebcc57e116c2ca8c968d202ec81681a835748 (patch)
tree4b3138435dc3fb0e4e55838c0fd7dabd01cc5ca1
parent2d8c1fdef9658d7c3d56bcfd5533188f6c8b6bf5 (diff)
IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don't
generate unnecessary %al clear on x86_64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116656 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGObjCMac.cpp2
-rw-r--r--test/CodeGenObjC/method-signatures.m14
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 8b3fd499b6..3440959408 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -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
index 0000000000..b03570950a
--- /dev/null
+++ b/test/CodeGenObjC/method-signatures.m
@@ -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 {
+ }
+}