Clang Project

clang_source_code/test/CodeGen/windows-on-arm-dllimport-dllexport.c
1// RUN: %clang_cc1 -Werror -triple thumbv7-windows-itanium -mfloat-abi hard -fms-extensions -emit-llvm %s -o - | FileCheck %s
2
3__declspec(dllexport) int export_int;
4
5__declspec(dllimport) int import_int;
6
7__declspec(dllexport) void export_declared_function();
8
9__declspec(dllexport) void export_implemented_function() {
10}
11
12__declspec(dllimport) void import_function(int);
13
14void call_imported_function() {
15  export_declared_function();
16  return import_function(import_int);
17}
18
19// CHECK: @import_int = external dllimport global i32
20// CHECK: @export_int = common dso_local dllexport global i32 0, align 4
21
22// CHECK: define dso_local dllexport arm_aapcs_vfpcc void @export_implemented_function()
23
24// CHECK: declare dllimport arm_aapcs_vfpcc void @import_function(i32)
25
26