diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-10-16 04:08:16 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-10-16 04:08:16 +0000 |
commit | 90bb5c231501ffa6d293677346e786afcf080ccf (patch) | |
tree | c07b7dce361d3c77d2f19d644179eb3482432548 /clang | |
parent | 44436302fb9687c6f9662be0f40b2f08f46c2b12 (diff) | |
download | bcm5719-llvm-90bb5c231501ffa6d293677346e786afcf080ccf.tar.gz bcm5719-llvm-90bb5c231501ffa6d293677346e786afcf080ccf.zip |
IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don't
generate unnecessary %al clear on x86_64.
llvm-svn: 116656
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 2 | ||||
-rw-r--r-- | clang/test/CodeGenObjC/method-signatures.m | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index 8b3fd499b66..3440959408e 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/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/clang/test/CodeGenObjC/method-signatures.m b/clang/test/CodeGenObjC/method-signatures.m new file mode 100644 index 00000000000..b03570950a2 --- /dev/null +++ b/clang/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 { + } +} |