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 | |
4 | struct __declspec(dllimport) S { |
5 | virtual void f() {} |
6 | } s; |
7 | // MSVC: [[VF_S:.*]] = private unnamed_addr constant { [2 x i8*] } |
8 | // MSVC-DAG: @"??_SS@@6B@" = unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* [[VF_S]], i32 0, i32 0, i32 1) |
9 | // MSVC-DAG: @"??_R0?AUS@@@8" = linkonce_odr |
10 | // MSVC-DAG: @"??_R1A@?0A@EA@S@@8" = linkonce_odr |
11 | // MSVC-DAG: @"??_R2S@@8" = linkonce_odr |
12 | // MSVC-DAG: @"??_R3S@@8" = linkonce_odr |
13 | |
14 | // GNU-DAG: @_ZTV1S = available_externally dllimport |
15 | // GNU-DAG: @_ZTI1S = linkonce_odr dso_local |
16 | |
17 | struct U : S { |
18 | } u; |
19 | |
20 | struct __declspec(dllimport) V { |
21 | virtual void f(); |
22 | } v; |
23 | // GNU-DAG: @_ZTV1V = available_externally dllimport |
24 | // GNU-DAG: @_ZTS1V = linkonce_odr dso_local |
25 | // GNU-DAG: @_ZTI1V = linkonce_odr dso_local |
26 | |
27 | struct W { |
28 | __declspec(dllimport) virtual void f(); |
29 | virtual void g(); |
30 | } w; |
31 | // GNU-DAG: @_ZTV1W = linkonce_odr dso_local |
32 | // GNU-DAG: @_ZTS1W = linkonce_odr dso_local |
33 | // GNU-DAG: @_ZTI1W = linkonce_odr dso_local |
34 | |