[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / no-common.c
blob11de0f23396e2d923923c597e534b42686ab7c65
1 // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-DEFAULT
2 // RUN: %clang_cc1 %s -fno-common -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-DEFAULT
3 // RUN: %clang_cc1 %s -fcommon -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-COMMON
5 // CHECK-COMMON: @x = common {{(dso_local )?}}global
6 // CHECK-DEFAULT: @x = {{(dso_local )?}}global
7 int x;
9 // CHECK-COMMON: @ABC = {{(dso_local )?}}global
10 // CHECK-DEFAULT: @ABC = {{(dso_local )?}}global
11 typedef void* (*fn_t)(long a, long b, char *f, int c);
12 fn_t ABC __attribute__ ((nocommon));
14 // CHECK-COMMON: @y = common {{(dso_local )?}}global
15 // CHECK-DEFAULT: @y = common {{(dso_local )?}}global
16 int y __attribute__((common));