David Majnemer | f607234 | 2014-07-01 22:24:56 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -fno-rtti-data -triple=i386-pc-win32 -o - -emit-llvm | FileCheck %s |
| 2 | |
| 3 | // vftable shouldn't have RTTI data in it. |
| 4 | // CHECK: @"\01??_7S@@6B@" = linkonce_odr unnamed_addr constant [1 x i8*] [i8* bitcast ({{.*}} @"\01??_GS@@UAEPAXI@Z" to i8*)] |
| 5 | |
| 6 | struct type_info; |
| 7 | namespace std { using ::type_info; } |
| 8 | |
| 9 | struct S { |
| 10 | virtual ~S(); |
| 11 | } s; |
| 12 | |
| 13 | struct U : S { |
| 14 | virtual ~U(); |
| 15 | }; |
| 16 | |
| 17 | extern S *getS(); |
| 18 | |
| 19 | const std::type_info &ti = typeid(*getS()); |
| 20 | const U &u = dynamic_cast<U &>(*getS()); |
NAKAMURA Takumi | 5db0b38 | 2014-07-01 23:33:03 +0000 | [diff] [blame] | 21 | // CHECK: call i8* @__RTDynamicCast(i8* %{{.+}}, i32 0, i8* bitcast ({{.*}} @"\01??_R0?AUS@@@8" to i8*), i8* bitcast ({{.*}} @"\01??_R0?AUU@@@8" to i8*), i32 1) |