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