From: Daniel Dunbar Date: Sat, 16 Oct 2010 04:08:16 +0000 (+0000) Subject: IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don't X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=338ebcc57e116c2ca8c968d202ec81681a835748;p=clang 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 --- 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 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 { + } +}