2015-04-16 05:50:06 +08:00
|
|
|
// RUN: %clang_cc1 -triple i386-pc-win32 %s -emit-llvm -fms-compatibility -o - | FileCheck %s
|
|
|
|
|
|
|
|
// selectany turns extern "C" variable declarations into definitions.
|
|
|
|
extern __declspec(selectany) int x1;
|
|
|
|
extern "C" __declspec(selectany) int x2;
|
|
|
|
extern "C++" __declspec(selectany) int x3;
|
|
|
|
extern "C" {
|
|
|
|
__declspec(selectany) int x4;
|
|
|
|
}
|
2015-04-16 07:04:24 +08:00
|
|
|
__declspec(selectany) int x5;
|
2018-03-17 04:36:49 +08:00
|
|
|
// CHECK: @"?x1@@3HA" = weak_odr dso_local global i32 0, comdat, align 4
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: @x2 = weak_odr dso_local global i32 0, comdat, align 4
|
2018-03-17 04:36:49 +08:00
|
|
|
// CHECK: @"?x3@@3HA" = weak_odr dso_local global i32 0, comdat, align 4
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: @x4 = weak_odr dso_local global i32 0, comdat, align 4
|
2018-03-17 04:36:49 +08:00
|
|
|
// CHECK: @"?x5@@3HA" = weak_odr dso_local global i32 0, comdat, align 4
|