@@ -506,15 +506,15 @@ pub fn resolveString(self: *Module, string: []const u8) !Id {
506
506
return id ;
507
507
}
508
508
509
- pub fn constStringGlobal (self : * Module , str : []const u8 ) ! IdRef {
509
+ pub fn constStringGlobal (self : * Module , str : []const u8 ) ! Id {
510
510
if (self .cache .const_strings .get (str )) | id | return id ;
511
511
512
512
const u8_ty = try self .intType (.unsigned , 8 );
513
513
const len = str .len + 1 ;
514
514
const len_id = try self .constant (try self .intType (.unsigned , 32 ), .{ .uint32 = @intCast (len ) });
515
515
const arr_ty = try self .arrayType (len_id , u8_ty );
516
516
517
- const char_ids = try self .gpa .alloc (IdRef , len );
517
+ const char_ids = try self .gpa .alloc (Id , len );
518
518
defer self .gpa .free (char_ids );
519
519
for (str , 0.. ) | c , i | {
520
520
char_ids [i ] = try self .constant (u8_ty , .{ .uint32 = c });
@@ -531,15 +531,15 @@ pub fn constStringGlobal(self: *Module, str: []const u8) !IdRef {
531
531
const ptr_ty = self .allocId ();
532
532
try self .sections .types_globals_constants .emit (self .gpa , .OpTypePointer , .{
533
533
.id_result = ptr_ty ,
534
- .storage_class = .UniformConstant ,
534
+ .storage_class = .uniform_constant ,
535
535
.type = arr_ty ,
536
536
});
537
537
538
538
const var_id = self .allocId ();
539
539
try self .sections .types_globals_constants .emit (self .gpa , .OpVariable , .{
540
540
.id_result_type = ptr_ty ,
541
541
.id_result = var_id ,
542
- .storage_class = .UniformConstant ,
542
+ .storage_class = .uniform_constant ,
543
543
.initializer = const_arr_id ,
544
544
});
545
545
0 commit comments