mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Change from ToImplicit to AsDesugared (#5591)
This changes `ToImplicit` to `AsDesugared`, and adds a `GetLocIdForDesugaring` to `InstStore`. In particular, I'm motivated by the latter, to make it clearer what the intended call convention is.
This commit is contained in:
@@ -124,9 +124,9 @@ auto GetOrAddInst(Context& context, SemIR::LocIdAndInst loc_id_and_inst)
|
||||
return context.constant_values().GetInstId(const_id);
|
||||
};
|
||||
|
||||
// If the instruction is implicit, produce its constant value instead if
|
||||
// possible.
|
||||
if (loc_id_and_inst.loc_id.is_implicit()) {
|
||||
// If the instruction is from desugaring, produce its constant value instead
|
||||
// if possible.
|
||||
if (loc_id_and_inst.loc_id.is_desugared()) {
|
||||
switch (loc_id_and_inst.inst.kind().constant_needs_inst_id()) {
|
||||
case SemIR::InstConstantNeedsInstIdKind::No: {
|
||||
// Evaluation doesn't need an InstId. Just do it.
|
||||
|
||||
Reference in New Issue
Block a user