From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CodeGenObjCXX/exceptions.mm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 clang/test/CodeGenObjCXX/exceptions.mm (limited to 'clang/test/CodeGenObjCXX/exceptions.mm') diff --git a/clang/test/CodeGenObjCXX/exceptions.mm b/clang/test/CodeGenObjCXX/exceptions.mm new file mode 100644 index 0000000..ce6d20a --- /dev/null +++ b/clang/test/CodeGenObjCXX/exceptions.mm @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -o - %s | FileCheck %s + +@interface OCType @end +void opaque(); + +namespace test0 { + + // CHECK: define void @_ZN5test03fooEv + void foo() { + try { + // CHECK: invoke void @_Z6opaquev + opaque(); + } catch (OCType *T) { + // CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__objc_personality_v0 to i8*) + // CHECK-NEXT: catch %struct._objc_typeinfo* @"OBJC_EHTYPE_$_OCType" + } + } +} -- cgit v1.2.3