File tree 3 files changed +16
-2
lines changed
3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -3416,8 +3416,9 @@ pub const DeclIterator = struct {
3416
3416
it .extra_index += 5 ; // src_hash(4) + line(1)
3417
3417
const name = it .zir .nullTerminatedString (it .zir .extra [it .extra_index ]);
3418
3418
it .extra_index += 3 ; // name(1) + value(1) + doc_comment(1)
3419
- it .extra_index += @as (u1 , @truncate (flags >> 2 ));
3420
- it .extra_index += @as (u1 , @truncate (flags >> 3 ));
3419
+ it .extra_index += @as (u1 , @truncate (flags >> 2 )); // align
3420
+ it .extra_index += @as (u1 , @truncate (flags >> 3 )); // link_section
3421
+ it .extra_index += @as (u1 , @truncate (flags >> 3 )); // address_space
3421
3422
3422
3423
return Item {
3423
3424
.sub_index = sub_index ,
Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ test {
228
228
_ = @import ("behavior/type.zig" );
229
229
_ = @import ("behavior/type_info.zig" );
230
230
_ = @import ("behavior/type_info_only_pub_decls.zig" );
231
+ _ = @import ("behavior/type_info_mul_linksection_addrspace_decls.zig" );
231
232
_ = @import ("behavior/typename.zig" );
232
233
_ = @import ("behavior/undefined.zig" );
233
234
_ = @import ("behavior/underscore.zig" );
Original file line number Diff line number Diff line change
1
+ const std = @import ("std" );
2
+ const expect = std .testing .expect ;
3
+
4
+ pub const a linksection ("sec_a" ) = 0 ;
5
+ pub const b linksection ("sec_b" ) = 0 ;
6
+ pub const c addrspace ("space_c" ) = 0 ;
7
+ pub const d addrspace ("space_d" ) = 0 ;
8
+
9
+ test {
10
+ const decls = @typeInfo (@This ()).Struct .decls ;
11
+ try expect (decls .len == 4 );
12
+ }
You can’t perform that action at this time.
0 commit comments