xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/rtti-fundamental.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc #include <typeinfo>
4*f4a2713aSLionel Sambuc 
5*f4a2713aSLionel Sambuc std::type_info foo() {
6*f4a2713aSLionel Sambuc   return typeid(void);
7*f4a2713aSLionel Sambuc }
8*f4a2713aSLionel Sambuc 
9*f4a2713aSLionel Sambuc namespace __cxxabiv1 {
10*f4a2713aSLionel Sambuc   struct __fundamental_type_info {
11*f4a2713aSLionel Sambuc     virtual ~__fundamental_type_info();
12*f4a2713aSLionel Sambuc   };
13*f4a2713aSLionel Sambuc 
14*f4a2713aSLionel Sambuc   __fundamental_type_info::~__fundamental_type_info() { }
15*f4a2713aSLionel Sambuc }
16*f4a2713aSLionel Sambuc 
17*f4a2713aSLionel Sambuc // void
18*f4a2713aSLionel Sambuc // CHECK: @_ZTIv = unnamed_addr constant
19*f4a2713aSLionel Sambuc // CHECK: @_ZTIPv = unnamed_addr constant
20*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKv = unnamed_addr constant
21*f4a2713aSLionel Sambuc 
22*f4a2713aSLionel Sambuc // std::nullptr_t
23*f4a2713aSLionel Sambuc // CHECK: @_ZTIDn = unnamed_addr constant
24*f4a2713aSLionel Sambuc // CHECK: @_ZTIPDn = unnamed_addr constant
25*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKDn = unnamed_addr constant
26*f4a2713aSLionel Sambuc 
27*f4a2713aSLionel Sambuc // bool
28*f4a2713aSLionel Sambuc // CHECK: @_ZTIb = unnamed_addr constant
29*f4a2713aSLionel Sambuc // CHECK: @_ZTIPb = unnamed_addr constant
30*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKb = unnamed_addr constant
31*f4a2713aSLionel Sambuc 
32*f4a2713aSLionel Sambuc // wchar_t
33*f4a2713aSLionel Sambuc // CHECK: @_ZTIw = unnamed_addr constant
34*f4a2713aSLionel Sambuc // CHECK: @_ZTIPw = unnamed_addr constant
35*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKw = unnamed_addr constant
36*f4a2713aSLionel Sambuc 
37*f4a2713aSLionel Sambuc // char
38*f4a2713aSLionel Sambuc // CHECK: @_ZTIc = unnamed_addr constant
39*f4a2713aSLionel Sambuc // CHECK: @_ZTIPc = unnamed_addr constant
40*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKc = unnamed_addr constant
41*f4a2713aSLionel Sambuc 
42*f4a2713aSLionel Sambuc // unsigned char
43*f4a2713aSLionel Sambuc // CHECK: @_ZTIh = unnamed_addr constant
44*f4a2713aSLionel Sambuc // CHECK: @_ZTIPh = unnamed_addr constant
45*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKh = unnamed_addr constant
46*f4a2713aSLionel Sambuc 
47*f4a2713aSLionel Sambuc // signed char
48*f4a2713aSLionel Sambuc // CHECK: @_ZTIa = unnamed_addr constant
49*f4a2713aSLionel Sambuc // CHECK: @_ZTIPa = unnamed_addr constant
50*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKa = unnamed_addr constant
51*f4a2713aSLionel Sambuc 
52*f4a2713aSLionel Sambuc // short
53*f4a2713aSLionel Sambuc // CHECK: @_ZTIs = unnamed_addr constant
54*f4a2713aSLionel Sambuc // CHECK: @_ZTIPs = unnamed_addr constant
55*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKs = unnamed_addr constant
56*f4a2713aSLionel Sambuc 
57*f4a2713aSLionel Sambuc // unsigned short
58*f4a2713aSLionel Sambuc // CHECK: @_ZTIt = unnamed_addr constant
59*f4a2713aSLionel Sambuc // CHECK: @_ZTIPt = unnamed_addr constant
60*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKt = unnamed_addr constant
61*f4a2713aSLionel Sambuc 
62*f4a2713aSLionel Sambuc // int
63*f4a2713aSLionel Sambuc // CHECK: @_ZTIi = unnamed_addr constant
64*f4a2713aSLionel Sambuc // CHECK: @_ZTIPi = unnamed_addr constant
65*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKi = unnamed_addr constant
66*f4a2713aSLionel Sambuc 
67*f4a2713aSLionel Sambuc // unsigned int
68*f4a2713aSLionel Sambuc // CHECK: @_ZTIj = unnamed_addr constant
69*f4a2713aSLionel Sambuc // CHECK: @_ZTIPj = unnamed_addr constant
70*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKj = unnamed_addr constant
71*f4a2713aSLionel Sambuc 
72*f4a2713aSLionel Sambuc // long
73*f4a2713aSLionel Sambuc // CHECK: @_ZTIl = unnamed_addr constant
74*f4a2713aSLionel Sambuc // CHECK: @_ZTIPl = unnamed_addr constant
75*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKl = unnamed_addr constant
76*f4a2713aSLionel Sambuc 
77*f4a2713aSLionel Sambuc // unsigned long
78*f4a2713aSLionel Sambuc // CHECK: @_ZTIm = unnamed_addr constant
79*f4a2713aSLionel Sambuc // CHECK: @_ZTIPm = unnamed_addr constant
80*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKm = unnamed_addr constant
81*f4a2713aSLionel Sambuc 
82*f4a2713aSLionel Sambuc // long long
83*f4a2713aSLionel Sambuc // CHECK: @_ZTIx = unnamed_addr constant
84*f4a2713aSLionel Sambuc // CHECK: @_ZTIPx = unnamed_addr constant
85*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKx = unnamed_addr constant
86*f4a2713aSLionel Sambuc 
87*f4a2713aSLionel Sambuc // unsigned long long
88*f4a2713aSLionel Sambuc // CHECK: @_ZTIy = unnamed_addr constant
89*f4a2713aSLionel Sambuc // CHECK: @_ZTIPy = unnamed_addr constant
90*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKy = unnamed_addr constant
91*f4a2713aSLionel Sambuc 
92*f4a2713aSLionel Sambuc // float
93*f4a2713aSLionel Sambuc // CHECK: @_ZTIf = unnamed_addr constant
94*f4a2713aSLionel Sambuc // CHECK: @_ZTIPf = unnamed_addr constant
95*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKf = unnamed_addr constant
96*f4a2713aSLionel Sambuc 
97*f4a2713aSLionel Sambuc // double
98*f4a2713aSLionel Sambuc // CHECK: @_ZTId = unnamed_addr constant
99*f4a2713aSLionel Sambuc // CHECK: @_ZTIPd = unnamed_addr constant
100*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKd = unnamed_addr constant
101*f4a2713aSLionel Sambuc 
102*f4a2713aSLionel Sambuc // long double
103*f4a2713aSLionel Sambuc // CHECK: @_ZTIe = unnamed_addr constant
104*f4a2713aSLionel Sambuc // CHECK: @_ZTIPe = unnamed_addr constant
105*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKe = unnamed_addr constant
106*f4a2713aSLionel Sambuc 
107*f4a2713aSLionel Sambuc // char16_t
108*f4a2713aSLionel Sambuc // CHECK: @_ZTIDs = unnamed_addr constant
109*f4a2713aSLionel Sambuc // CHECK: @_ZTIPDs = unnamed_addr constant
110*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKDs = unnamed_addr constant
111*f4a2713aSLionel Sambuc 
112*f4a2713aSLionel Sambuc // char32_t
113*f4a2713aSLionel Sambuc // CHECK: @_ZTIDi = unnamed_addr constant
114*f4a2713aSLionel Sambuc // CHECK: @_ZTIPDi = unnamed_addr constant
115*f4a2713aSLionel Sambuc // CHECK: @_ZTIPKDi = unnamed_addr constant
116*f4a2713aSLionel Sambuc 
117