Merge pull request #10165 from jmc-88/cbe

CBE: add .optional_single_mut_pointer and .optional_single_const_pointer to Type.childType
This commit is contained in:
Andrew Kelley
2021-11-22 21:36:24 -05:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -2485,6 +2485,8 @@ pub const Type = extern union {
.vector => ty.castTag(.vector).?.data.elem_type,
.array => ty.castTag(.array).?.data.elem_type,
.array_sentinel => ty.castTag(.array_sentinel).?.data.elem_type,
.optional_single_mut_pointer,
.optional_single_const_pointer,
.single_const_pointer,
.single_mut_pointer,
.many_const_pointer,

View File

@@ -2,6 +2,7 @@ const builtin = @import("builtin");
test {
// Tests that pass for stage1, stage2, and the C backend.
_ = @import("behavior/align.zig");
_ = @import("behavior/basic.zig");
_ = @import("behavior/bitcast.zig");
_ = @import("behavior/bool.zig");
@@ -22,6 +23,7 @@ test {
_ = @import("behavior/cast.zig");
_ = @import("behavior/defer.zig");
_ = @import("behavior/enum.zig");
_ = @import("behavior/error.zig");
_ = @import("behavior/hasdecl.zig");
_ = @import("behavior/hasfield.zig");
_ = @import("behavior/if.zig");
@@ -42,7 +44,6 @@ test {
if (builtin.object_format != .c) {
// Tests that pass for stage1 and stage2 but not the C backend.
_ = @import("behavior/align.zig");
_ = @import("behavior/array.zig");
_ = @import("behavior/atomics.zig");
_ = @import("behavior/basic_llvm.zig");
@@ -53,7 +54,6 @@ test {
_ = @import("behavior/bugs/2006.zig");
_ = @import("behavior/bugs/3112.zig");
_ = @import("behavior/cast_llvm.zig");
_ = @import("behavior/error.zig");
_ = @import("behavior/eval.zig");
_ = @import("behavior/floatop.zig");
_ = @import("behavior/fn.zig");