brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 046bf50 Raw
37 lines · cpp
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=MSVC2// RUN: %clang_cc1 -triple i686-windows-gnu   -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU3// 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=GNU4// RUN: %clang_cc1 -triple i686-pc-cygwin     -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU5// 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=GNU6 7struct __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_odr13// MSVC-DAG: @"??_R1A@?0A@EA@S@@8" = linkonce_odr14// MSVC-DAG: @"??_R2S@@8" = linkonce_odr15// MSVC-DAG: @"??_R3S@@8" = linkonce_odr16 17// GNU-DAG: @_ZTV1S = available_externally dllimport18// GNU-DAG: @_ZTI1S = linkonce_odr dso_local19 20struct U : S {21} u;22 23struct __declspec(dllimport) V {24  virtual void f();25} v;26// GNU-DAG: @_ZTV1V = available_externally dllimport27// GNU-DAG: @_ZTS1V = linkonce_odr dso_local28// GNU-DAG: @_ZTI1V = linkonce_odr dso_local29 30struct W {31  __declspec(dllimport) virtual void f();32  virtual void g();33} w;34// GNU-DAG: @_ZTV1W = linkonce_odr dso_local35// GNU-DAG: @_ZTS1W = linkonce_odr dso_local36// GNU-DAG: @_ZTI1W = linkonce_odr dso_local37