summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ms-declspecs.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
committerdim <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
commit3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (patch)
treedbbd4047878da71c1a706e26ce05b4e7791b14cc /test/CodeGen/ms-declspecs.c
parent38d6f2e7f2ce51a5b3836d26596c6c34a3288752 (diff)
downloadFreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.zip
FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.tar.gz
Vendor import of clang trunk r238337:
https://llvm.org/svn/llvm-project/cfe/trunk@238337
Diffstat (limited to 'test/CodeGen/ms-declspecs.c')
-rw-r--r--test/CodeGen/ms-declspecs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/CodeGen/ms-declspecs.c b/test/CodeGen/ms-declspecs.c
index 5dc7787..c32733e 100644
--- a/test/CodeGen/ms-declspecs.c
+++ b/test/CodeGen/ms-declspecs.c
@@ -2,8 +2,14 @@
__declspec(selectany) int x1 = 1;
const __declspec(selectany) int x2 = 2;
-// CHECK: @x1 = weak_odr global i32 1, align 4
-// CHECK: @x2 = weak_odr constant i32 2, align 4
+// CHECK: @x1 = weak_odr global i32 1, comdat, align 4
+// CHECK: @x2 = weak_odr constant i32 2, comdat, align 4
+
+// selectany turns extern variable declarations into definitions.
+__declspec(selectany) int x3;
+extern __declspec(selectany) int x4;
+// CHECK: @x3 = weak_odr global i32 0, comdat, align 4
+// CHECK: @x4 = weak_odr global i32 0, comdat, align 4
struct __declspec(align(16)) S {
char x;
OpenPOWER on IntegriCloud