xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/microsoft-no-rtti-data.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -fno-rtti-data -triple=i386-pc-win32 -o - -emit-llvm | FileCheck %s
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc // vftable shouldn't have RTTI data in it.
4*0a6a1f1dSLionel Sambuc // CHECK-NOT: @"\01??_R4S@@6B@"
5*0a6a1f1dSLionel Sambuc // CHECK: @"\01??_7S@@6B@" = linkonce_odr unnamed_addr constant [1 x i8*] [i8* bitcast ({{.*}} @"\01??_GS@@UAEPAXI@Z" to i8*)]
6*0a6a1f1dSLionel Sambuc 
7*0a6a1f1dSLionel Sambuc struct type_info;
8*0a6a1f1dSLionel Sambuc namespace std { using ::type_info; }
9*0a6a1f1dSLionel Sambuc 
10*0a6a1f1dSLionel Sambuc struct S {
11*0a6a1f1dSLionel Sambuc   virtual ~S();
12*0a6a1f1dSLionel Sambuc } s;
13*0a6a1f1dSLionel Sambuc 
14*0a6a1f1dSLionel Sambuc struct U : S {
15*0a6a1f1dSLionel Sambuc   virtual ~U();
16*0a6a1f1dSLionel Sambuc };
17*0a6a1f1dSLionel Sambuc 
18*0a6a1f1dSLionel Sambuc extern S *getS();
19*0a6a1f1dSLionel Sambuc 
20*0a6a1f1dSLionel Sambuc const std::type_info &ti = typeid(*getS());
21*0a6a1f1dSLionel Sambuc const U &u = dynamic_cast<U &>(*getS());
22*0a6a1f1dSLionel Sambuc // 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)
23