xref: /llvm-project/clang/test/CodeGenCXX/try-catch.cpp (revision 3512721d52b3380ea4d3f5b2419d0b7b072e7797)
1 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s
2 
3 struct X { };
4 
5 const X g();
6 
f()7 void f() {
8   try {
9     throw g();
10     // CHECK: @_ZTI1X
11   } catch (const X x) {
12   }
13 }
14 
h()15 void h() {
16   try {
17     throw "ABC";
18     // CHECK: @_ZTIPKc
19   } catch (char const(&)[4]) {
20   }
21 }
22