diff options
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig index c8e676f813..0a063a8ddc 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -6869,6 +6869,12 @@ pub fn funcType(mod: *Module, info: InternPool.Key.FuncType) Allocator.Error!Typ return (try intern(mod, .{ .func_type = info })).toType(); } +/// Use this for `anyframe->T` only. +/// For `anyframe`, use the `InternPool.Index.anyframe` tag directly. +pub fn anyframeType(mod: *Module, payload_ty: Type) Allocator.Error!Type { + return (try intern(mod, .{ .anyframe_type = payload_ty.toIntern() })).toType(); +} + /// Supports optionals in addition to pointers. pub fn ptrIntValue(mod: *Module, ty: Type, x: u64) Allocator.Error!Value { if (ty.isPtrLikeOptional(mod)) { |
