Mercurial > hg > CbC > CbC_llvm
view clang/test/CodeGenCXX/ms-integer-static-data-members-exported.cpp @ 206:f17a3b42b08b
Added tag before-12 for changeset b7591485f4cd
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 07 Jun 2021 21:25:57 +0900 (2021-06-07) |
parents | 1d019706d866 |
children |
line wrap: on
line source
// RUN: %clang_cc1 -emit-llvm -triple=i386-pc-win32 -fms-extensions %s -o - | FileCheck %s enum Enum { zero, one, two }; struct __declspec(dllexport) S { // In MS compatibility mode, this counts as a definition. // Since it is exported, it must be emitted even if it's unreferenced. static const short x = 42; // This works for enums too. static const Enum y = two; struct NonExported { // dllexport is not inherited by this nested class. // Since z is not referenced, it should not be emitted. static const int z = 42; }; }; // CHECK: @"?x@S@@2FB" = weak_odr dso_local dllexport constant i16 42, comdat, align 2 // CHECK: @"?y@S@@2W4Enum@@B" = weak_odr dso_local dllexport constant i32 2, comdat, align 4 // CHECK-NOT: NonExported