From 110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab Mon Sep 17 00:00:00 2001 From: dim Date: Mon, 2 May 2011 19:39:53 +0000 Subject: Vendor import of clang trunk r130700: http://llvm.org/svn/llvm-project/cfe/trunk@130700 --- test/CodeGenObjC/simplify-exceptions.mm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/CodeGenObjC/simplify-exceptions.mm (limited to 'test/CodeGenObjC/simplify-exceptions.mm') diff --git a/test/CodeGenObjC/simplify-exceptions.mm b/test/CodeGenObjC/simplify-exceptions.mm new file mode 100644 index 0000000..a35b10d --- /dev/null +++ b/test/CodeGenObjC/simplify-exceptions.mm @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm \ +// RUN: -fexceptions -fobjc-exceptions -fobjc-nonfragile-abi \ +// RUN: -o %t %s +// RUN: FileCheck < %t %s +// +// [irgen] [eh] Exception code built with clang (x86_64) crashes + +// Check that we don't emit unnecessary personality function references. +struct t0_A { t0_A(); }; +struct t0_B { t0_A a; }; + +// CHECK: define {{.*}} @_Z2t0v(){{.*}} { +// CHECK-NOT: objc_personality +// CHECK: } +t0_B& t0() { + static t0_B x; + return x; +} -- cgit v1.1