2015-05-27 03:44:52 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-optzns -o - %s | FileCheck %s --check-prefix=MSVC
|
|
|
|
// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-optzns -o - %s | FileCheck %s --check-prefix=GNU
|
2014-07-03 13:51:27 +08:00
|
|
|
|
|
|
|
struct __declspec(dllimport) S {
|
2014-11-07 15:26:38 +08:00
|
|
|
virtual void f() {}
|
2014-07-03 13:51:27 +08:00
|
|
|
} s;
|
2016-02-12 01:49:28 +08:00
|
|
|
// MSVC: [[VF_S:.*]] = private unnamed_addr constant [2 x i8*]
|
|
|
|
// MSVC-DAG: @"\01??_SS@@6B@" = unnamed_addr alias i8*, getelementptr inbounds ([2 x i8*], [2 x i8*]* [[VF_S]], i32 0, i32 1)
|
2014-11-07 15:26:38 +08:00
|
|
|
// MSVC-DAG: @"\01??_R0?AUS@@@8" = linkonce_odr
|
|
|
|
// MSVC-DAG: @"\01??_R1A@?0A@EA@S@@8" = linkonce_odr
|
|
|
|
// MSVC-DAG: @"\01??_R2S@@8" = linkonce_odr
|
|
|
|
// MSVC-DAG: @"\01??_R3S@@8" = linkonce_odr
|
|
|
|
|
|
|
|
// GNU-DAG: @_ZTV1S = available_externally dllimport
|
|
|
|
// GNU-DAG: @_ZTI1S = external dllimport
|
2014-07-03 13:51:27 +08:00
|
|
|
|
|
|
|
struct U : S {
|
|
|
|
} u;
|
2015-08-07 04:56:55 +08:00
|
|
|
|
|
|
|
struct __declspec(dllimport) V {
|
|
|
|
virtual void f();
|
|
|
|
} v;
|
|
|
|
// GNU-DAG: @_ZTV1V = available_externally dllimport
|
|
|
|
// GNU-DAG: @_ZTS1V = linkonce_odr
|
|
|
|
// GNU-DAG: @_ZTI1V = linkonce_odr
|
2015-08-11 03:39:01 +08:00
|
|
|
|
|
|
|
struct W {
|
|
|
|
__declspec(dllimport) virtual void f();
|
|
|
|
virtual void g();
|
|
|
|
} w;
|
|
|
|
// GNU-DAG: @_ZTV1W = linkonce_odr
|
|
|
|
// GNU-DAG: @_ZTS1W = linkonce_odr
|
|
|
|
// GNU-DAG: @_ZTI1W = linkonce_odr
|