@@ -63,7 +63,7 @@ llvm.mlir.global external @has_thr_local(42 : i64) {thr_local} : i64
63
63
llvm.mlir.global external @has_dso_local (42 : i64 ) {dso_local } : i64
64
64
65
65
// CHECK-LABEL: references
66
- func @references () {
66
+ func.func @references () {
67
67
// CHECK: llvm.mlir.addressof @global : !llvm.ptr<i64>
68
68
%0 = llvm.mlir.addressof @global : !llvm.ptr <i64 >
69
69
@@ -109,7 +109,7 @@ llvm.mlir.global internal constant @constant(37.0) : !llvm.label
109
109
110
110
// -----
111
111
112
- func @foo () {
112
+ func.func @foo () {
113
113
// expected-error @+1 {{must appear at the module level}}
114
114
llvm.mlir.global internal @bar (42 ) : i32
115
115
@@ -135,14 +135,14 @@ llvm.mlir.global internal @more_than_one_type(0) : i64, i32
135
135
136
136
llvm.mlir.global internal @foo (0 : i32 ) : i32
137
137
138
- func @bar () {
138
+ func.func @bar () {
139
139
// expected-error @+2{{expected ':'}}
140
140
llvm.mlir.addressof @foo
141
141
}
142
142
143
143
// -----
144
144
145
- func @foo () {
145
+ func.func @foo () {
146
146
// The attribute parser will consume the first colon-type, so we put two of
147
147
// them to trigger the attribute type mismatch error.
148
148
// expected-error @+1 {{invalid kind of attribute specified}}
@@ -151,7 +151,7 @@ func @foo() {
151
151
152
152
// -----
153
153
154
- func @foo () {
154
+ func.func @foo () {
155
155
// expected-error @+1 {{must reference a global defined by 'llvm.mlir.global'}}
156
156
llvm.mlir.addressof @foo : !llvm.ptr <func <void ()>>
157
157
}
@@ -160,7 +160,7 @@ func @foo() {
160
160
161
161
llvm.mlir.global internal @foo (0 : i32 ) : i32
162
162
163
- func @bar () {
163
+ func.func @bar () {
164
164
// expected-error @+1 {{the type must be a pointer to the type of the referenced global}}
165
165
llvm.mlir.addressof @foo : !llvm.ptr <i64 >
166
166
}
@@ -200,15 +200,15 @@ llvm.mlir.global internal @g(43 : i64) : i64 {
200
200
// -----
201
201
202
202
llvm.mlir.global internal @g (32 : i64 ) {addr_space = 3 : i32 } : i64
203
- func @mismatch_addr_space_implicit_global () {
203
+ func.func @mismatch_addr_space_implicit_global () {
204
204
// expected-error @+1 {{op the type must be a pointer to the type of the referenced global}}
205
205
llvm.mlir.addressof @g : !llvm.ptr <i64 >
206
206
}
207
207
208
208
// -----
209
209
210
210
llvm.mlir.global internal @g (32 : i64 ) {addr_space = 3 : i32 } : i64
211
- func @mismatch_addr_space () {
211
+ func.func @mismatch_addr_space () {
212
212
// expected-error @+1 {{op the type must be a pointer to the type of the referenced global}}
213
213
llvm.mlir.addressof @g : !llvm.ptr <i64 , 4 >
214
214
}
0 commit comments