blob: d4002c28b1a20bb66379d60e3a1aba3f6994911c [file] [log] [blame]
David Majnemerf6072342014-07-01 22:24:56 +00001// 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
6struct type_info;
7namespace std { using ::type_info; }
8
9struct S {
10 virtual ~S();
11} s;
12
13struct U : S {
14 virtual ~U();
15};
16
17extern S *getS();
18
19const std::type_info &ti = typeid(*getS());
20const U &u = dynamic_cast<U &>(*getS());
NAKAMURA Takumi5db0b382014-07-01 23:33:03 +000021// 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)