diff options
Diffstat (limited to 'src/Type.zig')
| -rw-r--r-- | src/Type.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Type.zig b/src/Type.zig index 7ddd43b034..883c752ef1 100644 --- a/src/Type.zig +++ b/src/Type.zig @@ -2541,6 +2541,13 @@ pub fn fnIsVarArgs(ty: Type, zcu: *const Zcu) bool { return zcu.intern_pool.indexToKey(ty.toIntern()).func_type.is_var_args; } +pub fn fnPtrMaskOrNull(ty: Type, zcu: *const Zcu) ?u64 { + return switch (ty.zigTypeTag(zcu)) { + .@"fn" => target_util.functionPointerMask(zcu.getTarget()), + else => null, + }; +} + pub fn isNumeric(ty: Type, zcu: *const Zcu) bool { return switch (ty.toIntern()) { .f16_type, |
