llvm-project
88 строк · 2.3 Кб
1;; Check that an error is emitted for local linkage symbols with DLL storage class.
2
3; RUN: rm -rf %t && split-file %s %t
4
5; RUN: not llvm-as %t/internal_function_dllexport.ll -o /dev/null 2>&1 | FileCheck %s
6; RUN: not llvm-as %t/internal_variable_dllexport.ll -o /dev/null 2>&1 | FileCheck %s
7; RUN: not llvm-as %t/internal_alias_dllexport.ll -o /dev/null 2>&1 | FileCheck %s
8
9; RUN: not llvm-as %t/private_function_dllexport.ll -o /dev/null 2>&1 | FileCheck %s
10; RUN: not llvm-as %t/private_variable_dllexport.ll -o /dev/null 2>&1 | FileCheck %s
11; RUN: not llvm-as %t/private_alias_dllexport.ll -o /dev/null 2>&1 | FileCheck %s
12
13; RUN: not llvm-as %t/internal_function_dllimport.ll -o /dev/null 2>&1 | FileCheck %s
14; RUN: not llvm-as %t/internal_variable_dllimport.ll -o /dev/null 2>&1 | FileCheck %s
15; RUN: not llvm-as %t/internal_alias_dllimport.ll -o /dev/null 2>&1 | FileCheck %s
16
17; RUN: not llvm-as %t/private_function_dllimport.ll -o /dev/null 2>&1 | FileCheck %s
18; RUN: not llvm-as %t/private_variable_dllimport.ll -o /dev/null 2>&1 | FileCheck %s
19; RUN: not llvm-as %t/private_alias_dllimport.ll -o /dev/null 2>&1 | FileCheck %s
20
21
22; CHECK: symbol with local linkage cannot have a DLL storage class
23
24
25;--- internal_function_dllexport.ll
26
27define internal dllexport void @function() {
28entry:
29ret void
30}
31
32;--- internal_variable_dllexport.ll
33
34@var = internal dllexport global i32 0
35
36;--- internal_alias_dllexport.ll
37
38@global = global i32 0
39@alias = internal dllexport alias i32, ptr @global
40
41;--- private_function_dllexport.ll
42
43define private dllexport void @function() {
44entry:
45ret void
46}
47
48;--- private_variable_dllexport.ll
49
50@var = private dllexport global i32 0
51
52;--- private_alias_dllexport.ll
53
54@global = global i32 0
55@alias = private dllexport alias i32, ptr @global
56
57
58;--- internal_function_dllimport.ll
59
60define internal dllimport void @function() {
61entry:
62ret void
63}
64
65;--- internal_variable_dllimport.ll
66
67@var = internal dllimport global i32 0
68
69;--- internal_alias_dllimport.ll
70
71@global = global i32 0
72@alias = internal dllimport alias i32, ptr @global
73
74;--- private_function_dllimport.ll
75
76define private dllimport void @function() {
77entry:
78ret void
79}
80
81;--- private_variable_dllimport.ll
82
83@var = private dllimport global i32 0
84
85;--- private_alias_dllimport.ll
86
87@global = global i32 0
88@alias = private dllimport alias i32, ptr @global
89