Skip to content

Commit 0e6dd7e

Browse files
authored
Add MaybeUnformed(T) type. (#5989)
This type has the same object representation as `T`, but always uses a pointer type as its value representation. No other semantics are provided for it yet.
1 parent 4483d1e commit 0e6dd7e

File tree

16 files changed

+318
-21
lines changed

16 files changed

+318
-21
lines changed

core/prelude/types.carbon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export import library "prelude/types/float";
1010
export import library "prelude/types/float_literal";
1111
export import library "prelude/types/int";
1212
export import library "prelude/types/int_literal";
13+
export import library "prelude/types/maybe_unformed";
1314
export import library "prelude/types/optional";
1415
export import library "prelude/types/string";
1516
export import library "prelude/types/uint";
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
2+
// Exceptions. See /LICENSE for license information.
3+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
5+
package Core library "prelude/types/maybe_unformed";
6+
7+
import library "prelude/destroy";
8+
9+
private fn MakeMaybeUnformed(t: type) -> type = "maybe_unformed.make_type";
10+
11+
class MaybeUnformed(T:! type) {
12+
adapt MakeMaybeUnformed(T);
13+
}

toolchain/check/eval.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,6 +1758,15 @@ static auto MakeConstantForBuiltinCall(EvalContext& eval_context,
17581758
return context.constant_values().Get(SemIR::BoolType::TypeInstId);
17591759
}
17601760

1761+
case SemIR::BuiltinFunctionKind::MaybeUnformedMakeType: {
1762+
return MakeConstantResult(
1763+
context,
1764+
SemIR::MaybeUnformedType{
1765+
.type_id = SemIR::TypeType::TypeId,
1766+
.inner_id = context.types().GetAsTypeInstId(arg_ids[0])},
1767+
phase);
1768+
}
1769+
17611770
// Character conversions.
17621771
case SemIR::BuiltinFunctionKind::CharConvertChecked: {
17631772
if (phase != Phase::Concrete) {
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
2+
// Exceptions. See /LICENSE for license information.
3+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
//
5+
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
6+
//
7+
// AUTOUPDATE
8+
// TIP: To test this file alone, run:
9+
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/builtins/maybe_unformed/make_type.carbon
10+
// TIP: To dump output, run:
11+
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/builtins/maybe_unformed/make_type.carbon
12+
13+
// --- types.carbon
14+
15+
library "[[@TEST_NAME]]";
16+
17+
fn Make(t: type) -> type = "maybe_unformed.make_type";
18+
19+
// --- use_types.carbon
20+
21+
library "[[@TEST_NAME]]";
22+
23+
import library "types";
24+
25+
//@dump-sem-ir-begin
26+
var b: Make(Make({}));
27+
//@dump-sem-ir-end
28+
29+
// --- runtime_call.carbon
30+
31+
library "[[@TEST_NAME]]";
32+
33+
import library "types";
34+
35+
//@dump-sem-ir-begin
36+
let t: type = {};
37+
let u: type = Make(t);
38+
//@dump-sem-ir-end
39+
40+
// --- fail_bad_decl.carbon
41+
42+
library "[[@TEST_NAME]]";
43+
44+
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "maybe_unformed.make_type" [InvalidBuiltinSignature]
45+
// CHECK:STDERR: fn NoParam() -> type = "maybe_unformed.make_type";
46+
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
47+
// CHECK:STDERR:
48+
fn NoParam() -> type = "maybe_unformed.make_type";
49+
50+
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "maybe_unformed.make_type" [InvalidBuiltinSignature]
51+
// CHECK:STDERR: fn ColonBangParam(T:! type) -> type = "maybe_unformed.make_type";
52+
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53+
// CHECK:STDERR:
54+
fn ColonBangParam(T:! type) -> type = "maybe_unformed.make_type";
55+
56+
// CHECK:STDOUT: --- use_types.carbon
57+
// CHECK:STDOUT:
58+
// CHECK:STDOUT: constants {
59+
// CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete]
60+
// CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete]
61+
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
62+
// CHECK:STDOUT: %.a8d: type = maybe_unformed_type %empty_struct_type [concrete]
63+
// CHECK:STDOUT: %.2ba: type = maybe_unformed_type %.a8d [concrete]
64+
// CHECK:STDOUT: %pattern_type.ce6: type = pattern_type %.2ba [concrete]
65+
// CHECK:STDOUT: }
66+
// CHECK:STDOUT:
67+
// CHECK:STDOUT: imports {
68+
// CHECK:STDOUT: %Main.Make: %Make.type = import_ref Main//types, Make, loaded [concrete = constants.%Make]
69+
// CHECK:STDOUT: }
70+
// CHECK:STDOUT:
71+
// CHECK:STDOUT: file {
72+
// CHECK:STDOUT: name_binding_decl {
73+
// CHECK:STDOUT: %b.patt: %pattern_type.ce6 = binding_pattern b [concrete]
74+
// CHECK:STDOUT: %b.var_patt: %pattern_type.ce6 = var_pattern %b.patt [concrete]
75+
// CHECK:STDOUT: }
76+
// CHECK:STDOUT: %b.var: ref %.2ba = var %b.var_patt [concrete]
77+
// CHECK:STDOUT: %.loc7_21.1: type = splice_block %.loc7_21.3 [concrete = constants.%.2ba] {
78+
// CHECK:STDOUT: %Make.ref.loc7_8: %Make.type = name_ref Make, imports.%Main.Make [concrete = constants.%Make]
79+
// CHECK:STDOUT: %Make.ref.loc7_13: %Make.type = name_ref Make, imports.%Main.Make [concrete = constants.%Make]
80+
// CHECK:STDOUT: %.loc7_19.1: %empty_struct_type = struct_literal ()
81+
// CHECK:STDOUT: %.loc7_19.2: type = converted %.loc7_19.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
82+
// CHECK:STDOUT: %Make.call.loc7_20: init type = call %Make.ref.loc7_13(%.loc7_19.2) [concrete = constants.%.a8d]
83+
// CHECK:STDOUT: %.loc7_20.1: type = value_of_initializer %Make.call.loc7_20 [concrete = constants.%.a8d]
84+
// CHECK:STDOUT: %.loc7_20.2: type = converted %Make.call.loc7_20, %.loc7_20.1 [concrete = constants.%.a8d]
85+
// CHECK:STDOUT: %Make.call.loc7_21: init type = call %Make.ref.loc7_8(%.loc7_20.2) [concrete = constants.%.2ba]
86+
// CHECK:STDOUT: %.loc7_21.2: type = value_of_initializer %Make.call.loc7_21 [concrete = constants.%.2ba]
87+
// CHECK:STDOUT: %.loc7_21.3: type = converted %Make.call.loc7_21, %.loc7_21.2 [concrete = constants.%.2ba]
88+
// CHECK:STDOUT: }
89+
// CHECK:STDOUT: %b: ref %.2ba = bind_name b, %b.var [concrete = %b.var]
90+
// CHECK:STDOUT: }
91+
// CHECK:STDOUT:
92+
// CHECK:STDOUT: --- runtime_call.carbon
93+
// CHECK:STDOUT:
94+
// CHECK:STDOUT: constants {
95+
// CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete]
96+
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
97+
// CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete]
98+
// CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete]
99+
// CHECK:STDOUT: }
100+
// CHECK:STDOUT:
101+
// CHECK:STDOUT: imports {
102+
// CHECK:STDOUT: %Main.Make: %Make.type = import_ref Main//types, Make, loaded [concrete = constants.%Make]
103+
// CHECK:STDOUT: }
104+
// CHECK:STDOUT:
105+
// CHECK:STDOUT: file {
106+
// CHECK:STDOUT: name_binding_decl {
107+
// CHECK:STDOUT: %t.patt: %pattern_type = binding_pattern t [concrete]
108+
// CHECK:STDOUT: }
109+
// CHECK:STDOUT: %.loc7: type = converted @__global_init.%.loc7, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
110+
// CHECK:STDOUT: %t: type = bind_name t, %.loc7
111+
// CHECK:STDOUT: name_binding_decl {
112+
// CHECK:STDOUT: %u.patt: %pattern_type = binding_pattern u [concrete]
113+
// CHECK:STDOUT: }
114+
// CHECK:STDOUT: %.loc8_21.1: type = value_of_initializer @__global_init.%Make.call
115+
// CHECK:STDOUT: %.loc8_21.2: type = converted @__global_init.%Make.call, %.loc8_21.1
116+
// CHECK:STDOUT: %u: type = bind_name u, %.loc8_21.2
117+
// CHECK:STDOUT: }
118+
// CHECK:STDOUT:
119+
// CHECK:STDOUT: fn @__global_init() {
120+
// CHECK:STDOUT: !entry:
121+
// CHECK:STDOUT: %.loc7: %empty_struct_type = struct_literal ()
122+
// CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, imports.%Main.Make [concrete = constants.%Make]
123+
// CHECK:STDOUT: %t.ref: type = name_ref t, file.%t
124+
// CHECK:STDOUT: %Make.call: init type = call %Make.ref(%t.ref)
125+
// CHECK:STDOUT: <elided>
126+
// CHECK:STDOUT: }
127+
// CHECK:STDOUT:

toolchain/check/testdata/for/actual.carbon

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -220,28 +220,28 @@ fn Read() {
220220
// CHECK:STDOUT: %Core.import_ref.1c9: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc12_18, loaded [concrete = constants.%assoc0.724]
221221
// CHECK:STDOUT: %Core.import_ref.ed6: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc13_17, loaded [concrete = constants.%assoc1.02e]
222222
// CHECK:STDOUT: %Core.import_ref.9e6: type = import_ref Core//prelude/iterate, loc13_17, loaded [concrete = %CursorType]
223-
// CHECK:STDOUT: %Core.import_ref.f49: @Optional.%Optional.None.type (%Optional.None.type.ef2) = import_ref Core//prelude/iterate, inst139 [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.fd6)]
224-
// CHECK:STDOUT: %Core.import_ref.1a8: @Optional.%Optional.Some.type (%Optional.Some.type.b2c) = import_ref Core//prelude/iterate, inst140 [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.d0d)]
225-
// CHECK:STDOUT: %Core.import_ref.36a9: @Optional.as.Destroy.impl.%Optional.as.Destroy.impl.Op.type (%Optional.as.Destroy.impl.Op.type.764) = import_ref Core//prelude/iterate, inst6890 [indirect], loaded [symbolic = @Optional.as.Destroy.impl.%Optional.as.Destroy.impl.Op (constants.%Optional.as.Destroy.impl.Op.bf8)]
223+
// CHECK:STDOUT: %Core.import_ref.f49: @Optional.%Optional.None.type (%Optional.None.type.ef2) = import_ref Core//prelude/iterate, inst140 [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.fd6)]
224+
// CHECK:STDOUT: %Core.import_ref.1a8: @Optional.%Optional.Some.type (%Optional.Some.type.b2c) = import_ref Core//prelude/iterate, inst141 [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.d0d)]
225+
// CHECK:STDOUT: %Core.import_ref.36a9: @Optional.as.Destroy.impl.%Optional.as.Destroy.impl.Op.type (%Optional.as.Destroy.impl.Op.type.764) = import_ref Core//prelude/iterate, inst6891 [indirect], loaded [symbolic = @Optional.as.Destroy.impl.%Optional.as.Destroy.impl.Op (constants.%Optional.as.Destroy.impl.Op.bf8)]
226226
// CHECK:STDOUT: %Destroy.impl_witness_table.2ff = impl_witness_table (%Core.import_ref.36a9), @Optional.as.Destroy.impl [concrete]
227-
// CHECK:STDOUT: %Core.import_ref.cf4: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9) = import_ref Core//prelude/iterate, inst483 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f06)]
227+
// CHECK:STDOUT: %Core.import_ref.cf4: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.0f9) = import_ref Core//prelude/iterate, inst484 [indirect], loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f06)]
228228
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.2b9 = impl_witness_table (%Core.import_ref.cf4), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
229-
// CHECK:STDOUT: %Core.import_ref.741: @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op.type (%Int.as.Destroy.impl.Op.type) = import_ref Core//prelude/iterate, inst451 [indirect], loaded [symbolic = @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op (constants.%Int.as.Destroy.impl.Op)]
229+
// CHECK:STDOUT: %Core.import_ref.741: @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op.type (%Int.as.Destroy.impl.Op.type) = import_ref Core//prelude/iterate, inst452 [indirect], loaded [symbolic = @Int.as.Destroy.impl.%Int.as.Destroy.impl.Op (constants.%Int.as.Destroy.impl.Op)]
230230
// CHECK:STDOUT: %Destroy.impl_witness_table.1b4 = impl_witness_table (%Core.import_ref.741), @Int.as.Destroy.impl [concrete]
231-
// CHECK:STDOUT: %Core.import_ref.19a: @OrderedWith.%OrderedWith.assoc_type (%OrderedWith.assoc_type.03c) = import_ref Core//prelude/iterate, inst863 [indirect], loaded [symbolic = @OrderedWith.%assoc0 (constants.%assoc0.5db)]
232-
// CHECK:STDOUT: %Core.import_ref.b2b: @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.2c7) = import_ref Core//prelude/iterate, inst952 [indirect], loaded [symbolic = @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.a5a)]
233-
// CHECK:STDOUT: %Core.import_ref.ab6 = import_ref Core//prelude/iterate, inst953 [indirect], unloaded
234-
// CHECK:STDOUT: %Core.import_ref.875 = import_ref Core//prelude/iterate, inst954 [indirect], unloaded
235-
// CHECK:STDOUT: %Core.import_ref.82b = import_ref Core//prelude/iterate, inst955 [indirect], unloaded
231+
// CHECK:STDOUT: %Core.import_ref.19a: @OrderedWith.%OrderedWith.assoc_type (%OrderedWith.assoc_type.03c) = import_ref Core//prelude/iterate, inst864 [indirect], loaded [symbolic = @OrderedWith.%assoc0 (constants.%assoc0.5db)]
232+
// CHECK:STDOUT: %Core.import_ref.b2b: @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.2c7) = import_ref Core//prelude/iterate, inst953 [indirect], loaded [symbolic = @Int.as.OrderedWith.impl.db3.%Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.a5a)]
233+
// CHECK:STDOUT: %Core.import_ref.ab6 = import_ref Core//prelude/iterate, inst954 [indirect], unloaded
234+
// CHECK:STDOUT: %Core.import_ref.875 = import_ref Core//prelude/iterate, inst955 [indirect], unloaded
235+
// CHECK:STDOUT: %Core.import_ref.82b = import_ref Core//prelude/iterate, inst956 [indirect], unloaded
236236
// CHECK:STDOUT: %OrderedWith.impl_witness_table.476 = impl_witness_table (%Core.import_ref.b2b, %Core.import_ref.ab6, %Core.import_ref.875, %Core.import_ref.82b), @Int.as.OrderedWith.impl.db3 [concrete]
237-
// CHECK:STDOUT: %Core.import_ref.13d: @OrderedWith.%OrderedWith.Less.type (%OrderedWith.Less.type.f19) = import_ref Core//prelude/iterate, inst1927 [indirect], loaded [symbolic = @OrderedWith.%OrderedWith.Less (constants.%OrderedWith.Less.02e)]
237+
// CHECK:STDOUT: %Core.import_ref.13d: @OrderedWith.%OrderedWith.Less.type (%OrderedWith.Less.type.f19) = import_ref Core//prelude/iterate, inst1928 [indirect], loaded [symbolic = @OrderedWith.%OrderedWith.Less (constants.%OrderedWith.Less.02e)]
238238
// CHECK:STDOUT: %CursorType: type = assoc_const_decl @CursorType [concrete] {}
239239
// CHECK:STDOUT: %Core.import_ref.4f9: type = import_ref Core//prelude/iterate, loc12_18, loaded [concrete = %ElementType]
240240
// CHECK:STDOUT: %ElementType: type = assoc_const_decl @ElementType [concrete] {}
241241
// CHECK:STDOUT: %Core.Optional: %Optional.type = import_ref Core//prelude/types/optional, Optional, loaded [concrete = constants.%Optional.generic]
242242
// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
243243
// CHECK:STDOUT: %Core.OrderedWith: %OrderedWith.type.270 = import_ref Core//prelude/operators/comparison, OrderedWith, loaded [concrete = constants.%OrderedWith.generic]
244-
// CHECK:STDOUT: %Core.import_ref.d49 = import_ref Core//prelude/iterate, inst6645 [indirect], unloaded
244+
// CHECK:STDOUT: %Core.import_ref.d49 = import_ref Core//prelude/iterate, inst6646 [indirect], unloaded
245245
// CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type]
246246
// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
247247
// CHECK:STDOUT: }

toolchain/check/type_completion.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ class TypeCompleter {
142142
SemIR::CustomLayoutType inst) const
143143
-> SemIR::CompleteTypeInfo;
144144

145+
auto BuildInfoForInst(SemIR::TypeId /*type_id*/,
146+
SemIR::MaybeUnformedType inst) const
147+
-> SemIR::CompleteTypeInfo;
148+
145149
auto BuildInfoForInst(SemIR::TypeId /*type_id*/,
146150
SemIR::PartialType inst) const
147151
-> SemIR::CompleteTypeInfo;
@@ -314,6 +318,10 @@ auto TypeCompleter::AddNestedIncompleteTypes(SemIR::Inst type_inst) -> bool {
314318
}
315319
break;
316320
}
321+
case CARBON_KIND(SemIR::MaybeUnformedType inst): {
322+
Push(context_->types().GetTypeIdForTypeInstId(inst.inner_id));
323+
break;
324+
}
317325
case CARBON_KIND(SemIR::PartialType inst): {
318326
Push(context_->types().GetTypeIdForTypeInstId(inst.inner_id));
319327
break;
@@ -539,6 +547,14 @@ auto TypeCompleter::BuildInfoForInst(SemIR::TypeId type_id,
539547
return {.value_repr = MakePointerValueRepr(type_id)};
540548
}
541549

550+
auto TypeCompleter::BuildInfoForInst(SemIR::TypeId type_id,
551+
SemIR::MaybeUnformedType /*inst*/) const
552+
-> SemIR::CompleteTypeInfo {
553+
// `MaybeUnformed(T)` always has a pointer value representation, regardless of
554+
// `T`'s value representation.
555+
return {.value_repr = MakePointerValueRepr(type_id)};
556+
}
557+
542558
auto TypeCompleter::BuildInfoForInst(SemIR::TypeId /*type_id*/,
543559
SemIR::PartialType inst) const
544560
-> SemIR::CompleteTypeInfo {

toolchain/lower/file_context.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,10 @@ static auto BuildTypeForInst(FileContext& context, SemIR::ClassType inst)
763763
return context.GetType(object_repr_id);
764764
}
765765

766-
static auto BuildTypeForInst(FileContext& context, SemIR::ConstType inst)
767-
-> llvm::Type* {
766+
template <typename InstT>
767+
requires(InstT::Kind.template IsAnyOf<
768+
SemIR::ConstType, SemIR::MaybeUnformedType, SemIR::PartialType>())
769+
static auto BuildTypeForInst(FileContext& context, InstT inst) -> llvm::Type* {
768770
return context.GetType(
769771
context.sem_ir().types().GetTypeIdForTypeInstId(inst.inner_id));
770772
}
@@ -776,12 +778,6 @@ static auto BuildTypeForInst(FileContext& context, SemIR::CustomLayoutType inst)
776778
layout[SemIR::CustomLayoutId::SizeIndex]);
777779
}
778780

779-
static auto BuildTypeForInst(FileContext& context, SemIR::PartialType inst)
780-
-> llvm::Type* {
781-
return context.GetType(
782-
context.sem_ir().types().GetTypeIdForTypeInstId(inst.inner_id));
783-
}
784-
785781
static auto BuildTypeForInst(FileContext& context,
786782
SemIR::ImplWitnessAssociatedConstant inst)
787783
-> llvm::Type* {

toolchain/lower/handle_call.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ static auto HandleBuiltinCall(FunctionContext& context, SemIR::InstId inst_id,
324324
case SemIR::BuiltinFunctionKind::IntLiteralMakeType:
325325
case SemIR::BuiltinFunctionKind::IntMakeTypeSigned:
326326
case SemIR::BuiltinFunctionKind::IntMakeTypeUnsigned:
327+
case SemIR::BuiltinFunctionKind::MaybeUnformedMakeType:
327328
context.SetLocal(inst_id, context.GetTypeAsValue());
328329
return;
329330

0 commit comments

Comments
 (0)