[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / ps4-dllimport-dllexport.c
blobefcdc4d7a5c482a2e585901625d348de094f4466
1 // RUN: %clang_cc1 -triple x86_64-scei-ps4 -fdeclspec -Werror -emit-llvm %s -o - | FileCheck %s
2 // RUN: %clang_cc1 -triple x86_64-sie-ps5 -fdeclspec -Werror -emit-llvm %s -o - | FileCheck %s
4 __declspec(dllexport) int export_int;
6 __declspec(dllimport) int import_int;
8 __declspec(dllexport) void export_declared_function(void);
10 __declspec(dllexport) void export_implemented_function(void) {
13 __declspec(dllimport) void import_function(int);
15 void call_imported_function(void) {
16 export_declared_function();
17 return import_function(import_int);
20 // CHECK-DAG: @import_int = external dllimport
21 // CHECK-DAG: @export_int ={{.*}} dllexport global i32 0
22 // CHECK-DAG: define{{.*}} dllexport void @export_implemented_function()
23 // CHECK-DAG: declare dllimport void @import_function(i32 noundef)