Debian Codegraph @

clang/test/CodeGenCXX/dllimport-rtti.cpp

raw
1 // RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=MSVC
2 // RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU
3 // RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU
4 // RUN: %clang_cc1 -triple i686-pc-cygwin -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU
5 // RUN: %clang_cc1 -triple x86_64-pc-cygwin -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU
6
7 struct __declspec(dllimport) S {
8 virtual void f() {}
9 } s;
10 // MSVC: [[VF_S:.*]] = private unnamed_addr constant { [2 x ptr] }
11 // MSVC-DAG: @"??_SS@@6B@" = unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr [[VF_S]], i32 0, i32 0, i32 1)
12 // MSVC-DAG: @"??_R0?AUS@@@8" = linkonce_odr
13 // MSVC-DAG: @"??_R1A@?0A@EA@S@@8" = linkonce_odr
14 // MSVC-DAG: @"??_R2S@@8" = linkonce_odr
15 // MSVC-DAG: @"??_R3S@@8" = linkonce_odr
16
17 // GNU-DAG: @_ZTV1S = available_externally dllimport
18 // GNU-DAG: @_ZTI1S = linkonce_odr dso_local
19
20 struct U : S {
21 } u;
22
23 struct __declspec(dllimport) V {
24 virtual void f();
25 } v;
26 // GNU-DAG: @_ZTV1V = available_externally dllimport
27 // GNU-DAG: @_ZTS1V = linkonce_odr dso_local
28 // GNU-DAG: @_ZTI1V = linkonce_odr dso_local
29
30 struct W {
31 __declspec(dllimport) virtual void f();
32 virtual void g();
33 } w;
34 // GNU-DAG: @_ZTV1W = linkonce_odr dso_local
35 // GNU-DAG: @_ZTS1W = linkonce_odr dso_local
36 // GNU-DAG: @_ZTI1W = linkonce_odr dso_local