aboutsummaryrefslogtreecommitdiff
path: root/src-self-hosted/type.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-07-13 00:32:12 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-07-13 00:32:12 -0700
commit75a720565bb72e7fab03346df6a35e9a8f380962 (patch)
tree954fccd90a73b8ed6e7c9f7a45a2c978c1a67840 /src-self-hosted/type.zig
parent1cab40d7837c69fe6a77f76be9dc27026acd935e (diff)
parentc94652a2fd210fe4f007dbdd47c9e55b38e482fb (diff)
downloadzig-75a720565bb72e7fab03346df6a35e9a8f380962.tar.gz
zig-75a720565bb72e7fab03346df6a35e9a8f380962.zip
Merge branch 'stage2-condbr'
Diffstat (limited to 'src-self-hosted/type.zig')
-rw-r--r--src-self-hosted/type.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src-self-hosted/type.zig b/src-self-hosted/type.zig
index c0d88b1414..512dd631a7 100644
--- a/src-self-hosted/type.zig
+++ b/src-self-hosted/type.zig
@@ -468,6 +468,10 @@ pub const Type = extern union {
};
}
+ pub fn isNoReturn(self: Type) bool {
+ return self.zigTypeTag() == .NoReturn;
+ }
+
/// Asserts that hasCodeGenBits() is true.
pub fn abiAlignment(self: Type, target: Target) u32 {
return switch (self.tag()) {