diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:54:40 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:54:40 +0000 |
commit | 3d1dcd9bfdb15c49ee34d576a065079ac5c4d29f (patch) | |
tree | 0bbe07708f7571f8b5291f6d7b96c102b7c99dee /test/CodeGenObjC/gnu-exceptions.m | |
parent | a0482fa4e7fa27b01184f938097f0666b78016dd (diff) |
Diffstat (limited to 'test/CodeGenObjC/gnu-exceptions.m')
-rw-r--r-- | test/CodeGenObjC/gnu-exceptions.m | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGenObjC/gnu-exceptions.m b/test/CodeGenObjC/gnu-exceptions.m new file mode 100644 index 0000000000000..6790a29937501 --- /dev/null +++ b/test/CodeGenObjC/gnu-exceptions.m @@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -fexceptions -fgnu-runtime -o - %s | FileCheck %s + +void opaque(void); +void log(int i); + +@class C; + +// CHECK: define void @test0() { +void test0() { + @try { + // CHECK: invoke void @opaque() + opaque(); + + // CHECK: call void @log(i32 1) + + } @catch (C *c) { + // CHECK: call i8* @llvm.eh.exception() + // CHECK: call i32 (i8*, i8*, ...)* @llvm.eh.selector({{.*}} @__gnu_objc_personality_v0 + // CHECK: br i1 + + // CHECK: call void @log(i32 0) + + // CHECK: call void @objc_exception_throw + + log(0); + } + + log(1); +} |