Quellcode durchsuchen

Resolve "DO NOT SUBMIT" comment (#6692)

Whoops.
Geoff Romer vor 2 Monaten
Ursprung
Commit
8efb4aa989
2 geänderte Dateien mit 23 neuen und 25 gelöschten Zeilen
  1. 1 1
      toolchain/sem_ir/inst_kind.def
  2. 22 24
      toolchain/sem_ir/typed_insts.h

+ 1 - 1
toolchain/sem_ir/inst_kind.def

@@ -86,7 +86,6 @@ CARBON_SEM_IR_INST_KIND(ImportCppDecl)
 CARBON_SEM_IR_INST_KIND(ImportDecl)
 CARBON_SEM_IR_INST_KIND(ImportRefLoaded)
 CARBON_SEM_IR_INST_KIND(ImportRefUnloaded)
-CARBON_SEM_IR_INST_KIND(MarkInPlaceInit)
 CARBON_SEM_IR_INST_KIND(InitForm)
 CARBON_SEM_IR_INST_KIND(InPlaceInit)
 CARBON_SEM_IR_INST_KIND(InstType)
@@ -96,6 +95,7 @@ CARBON_SEM_IR_INST_KIND(IntType)
 CARBON_SEM_IR_INST_KIND(IntValue)
 CARBON_SEM_IR_INST_KIND(InterfaceDecl)
 CARBON_SEM_IR_INST_KIND(LookupImplWitness)
+CARBON_SEM_IR_INST_KIND(MarkInPlaceInit)
 CARBON_SEM_IR_INST_KIND(MaybeUnformedType)
 CARBON_SEM_IR_INST_KIND(NameBindingDecl)
 CARBON_SEM_IR_INST_KIND(NamedConstraintDecl)

+ 22 - 24
toolchain/sem_ir/typed_insts.h

@@ -1025,30 +1025,6 @@ struct ImportRefLoaded {
   EntityNameId entity_name_id;
 };
 
-// DO NOT SUBMIT until this file and inst_kind.def are re-alphabetized.
-
-// Records that evaluation of the expression `src_id` will initialize the
-// storage identified by `dest_id` (even if its type's initializing
-// representation is not normally in-place), and forms an in-place initializing
-// expression to represent it. Note that `src_id` must find its target storage
-// using the exact ID `dest_id`, not another ID that aliases it.
-//
-// This is used to model the initialization performed by C++ thunks, where
-// in-place initialization is used even for types that would normally have a
-// copy initializing representation.
-struct MarkInPlaceInit {
-  static constexpr auto Kind = InstKind::MarkInPlaceInit.Define<Parse::NodeId>(
-      {.ir_name = "mark_in_place_init",
-       .expr_category = ExprCategory::InPlaceInitializing,
-       .constant_kind = InstConstantKind::Never});
-
-  TypeId type_id;
-  // Used only to track the source of the initialization; this has no semantic
-  // meaning.
-  InstId src_id;
-  DestInstId dest_id;
-};
-
 // An initializing primitive form.
 struct InitForm {
   static constexpr auto Kind = InstKind::InitForm.Define<Parse::NodeId>(
@@ -1176,6 +1152,28 @@ struct LookupImplWitness {
   SpecificInterfaceId query_specific_interface_id;
 };
 
+// Records that evaluation of the expression `src_id` will initialize the
+// storage identified by `dest_id` (even if its type's initializing
+// representation is not normally in-place), and forms an in-place initializing
+// expression to represent it. Note that `src_id` must find its target storage
+// using the exact ID `dest_id`, not another ID that aliases it.
+//
+// This is used to model the initialization performed by C++ thunks, where
+// in-place initialization is used even for types that would normally have a
+// copy initializing representation.
+struct MarkInPlaceInit {
+  static constexpr auto Kind = InstKind::MarkInPlaceInit.Define<Parse::NodeId>(
+      {.ir_name = "mark_in_place_init",
+       .expr_category = ExprCategory::InPlaceInitializing,
+       .constant_kind = InstConstantKind::Never});
+
+  TypeId type_id;
+  // Used only to track the source of the initialization; this has no semantic
+  // meaning.
+  InstId src_id;
+  DestInstId dest_id;
+};
+
 // A type that holds an object representation of another type, that may or may
 // not be a valid representation. In particular, it may also hold an unformed
 // state.