blob: 2495e969bff89e2292659bde2931f8f963d21aad [file] [log] [blame]
Rafael Espindolad0c89a42010-03-27 02:52:40 +00001// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
2
3#include <typeinfo>
4
5std::type_info foo() {
6 return typeid(void);
7}
8
9namespace __cxxabiv1 {
10 struct __fundamental_type_info {
Douglas Gregor1e201b42010-04-08 15:52:03 +000011 virtual ~__fundamental_type_info();
Rafael Espindolad0c89a42010-03-27 02:52:40 +000012 };
Douglas Gregor1e201b42010-04-08 15:52:03 +000013
14 __fundamental_type_info::~__fundamental_type_info() { }
Rafael Espindolad0c89a42010-03-27 02:52:40 +000015}
16
Anders Carlsson2bd62502010-11-04 05:28:09 +000017// void
Rafael Espindola57244f62011-01-11 23:55:05 +000018// CHECK: @_ZTIv = unnamed_addr constant
19// CHECK: @_ZTIPv = unnamed_addr constant
20// CHECK: @_ZTIPKv = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000021
22// std::nullptr_t
Rafael Espindola57244f62011-01-11 23:55:05 +000023// CHECK: @_ZTIDn = unnamed_addr constant
24// CHECK: @_ZTIPDn = unnamed_addr constant
25// CHECK: @_ZTIPKDn = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000026
27// bool
Rafael Espindola57244f62011-01-11 23:55:05 +000028// CHECK: @_ZTIb = unnamed_addr constant
29// CHECK: @_ZTIPb = unnamed_addr constant
30// CHECK: @_ZTIPKb = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000031
32// wchar_t
Rafael Espindola57244f62011-01-11 23:55:05 +000033// CHECK: @_ZTIw = unnamed_addr constant
34// CHECK: @_ZTIPw = unnamed_addr constant
35// CHECK: @_ZTIPKw = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000036
37// char
Rafael Espindola57244f62011-01-11 23:55:05 +000038// CHECK: @_ZTIc = unnamed_addr constant
39// CHECK: @_ZTIPc = unnamed_addr constant
40// CHECK: @_ZTIPKc = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000041
42// unsigned char
Rafael Espindola57244f62011-01-11 23:55:05 +000043// CHECK: @_ZTIh = unnamed_addr constant
44// CHECK: @_ZTIPh = unnamed_addr constant
45// CHECK: @_ZTIPKh = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000046
47// signed char
Rafael Espindola57244f62011-01-11 23:55:05 +000048// CHECK: @_ZTIa = unnamed_addr constant
49// CHECK: @_ZTIPa = unnamed_addr constant
50// CHECK: @_ZTIPKa = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000051
52// short
Rafael Espindola57244f62011-01-11 23:55:05 +000053// CHECK: @_ZTIs = unnamed_addr constant
54// CHECK: @_ZTIPs = unnamed_addr constant
55// CHECK: @_ZTIPKs = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000056
57// unsigned short
Rafael Espindola57244f62011-01-11 23:55:05 +000058// CHECK: @_ZTIt = unnamed_addr constant
59// CHECK: @_ZTIPt = unnamed_addr constant
60// CHECK: @_ZTIPKt = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000061
62// int
Rafael Espindola57244f62011-01-11 23:55:05 +000063// CHECK: @_ZTIi = unnamed_addr constant
64// CHECK: @_ZTIPi = unnamed_addr constant
65// CHECK: @_ZTIPKi = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000066
67// unsigned int
Rafael Espindola57244f62011-01-11 23:55:05 +000068// CHECK: @_ZTIj = unnamed_addr constant
69// CHECK: @_ZTIPj = unnamed_addr constant
70// CHECK: @_ZTIPKj = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000071
72// long
Rafael Espindola57244f62011-01-11 23:55:05 +000073// CHECK: @_ZTIl = unnamed_addr constant
74// CHECK: @_ZTIPl = unnamed_addr constant
75// CHECK: @_ZTIPKl = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000076
77// unsigned long
Rafael Espindola57244f62011-01-11 23:55:05 +000078// CHECK: @_ZTIm = unnamed_addr constant
79// CHECK: @_ZTIPm = unnamed_addr constant
80// CHECK: @_ZTIPKm = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000081
82// long long
Rafael Espindola57244f62011-01-11 23:55:05 +000083// CHECK: @_ZTIx = unnamed_addr constant
84// CHECK: @_ZTIPx = unnamed_addr constant
85// CHECK: @_ZTIPKx = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000086
87// unsigned long long
Rafael Espindola57244f62011-01-11 23:55:05 +000088// CHECK: @_ZTIy = unnamed_addr constant
89// CHECK: @_ZTIPy = unnamed_addr constant
90// CHECK: @_ZTIPKy = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000091
92// float
Rafael Espindola57244f62011-01-11 23:55:05 +000093// CHECK: @_ZTIf = unnamed_addr constant
94// CHECK: @_ZTIPf = unnamed_addr constant
95// CHECK: @_ZTIPKf = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +000096
97// double
Rafael Espindola57244f62011-01-11 23:55:05 +000098// CHECK: @_ZTId = unnamed_addr constant
99// CHECK: @_ZTIPd = unnamed_addr constant
100// CHECK: @_ZTIPKd = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +0000101
102// long double
Rafael Espindola57244f62011-01-11 23:55:05 +0000103// CHECK: @_ZTIe = unnamed_addr constant
104// CHECK: @_ZTIPe = unnamed_addr constant
105// CHECK: @_ZTIPKe = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +0000106
107// char16_t
Rafael Espindola57244f62011-01-11 23:55:05 +0000108// CHECK: @_ZTIDs = unnamed_addr constant
109// CHECK: @_ZTIPDs = unnamed_addr constant
110// CHECK: @_ZTIPKDs = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +0000111
112// char32_t
Rafael Espindola57244f62011-01-11 23:55:05 +0000113// CHECK: @_ZTIDi = unnamed_addr constant
114// CHECK: @_ZTIPDi = unnamed_addr constant
115// CHECK: @_ZTIPKDi = unnamed_addr constant
Anders Carlsson2bd62502010-11-04 05:28:09 +0000116