Generalize def_inst() to def_entity().
Use this source map method for assigning a location to any entity whose source number is not exposed. This could be - Instructions. - Signatures defined implicitly by function decls. These entities only appear in the location map, not the entity number maps.
This commit is contained in:
@@ -837,7 +837,7 @@ impl<'a> Parser<'a> {
|
||||
let inst = ctx.function.dfg.make_inst(inst_data);
|
||||
let num_results = ctx.function.dfg.make_inst_results(inst, ctrl_typevar);
|
||||
ctx.function.layout.append_inst(inst, ebb);
|
||||
ctx.map.def_inst(inst, &opcode_loc).expect("duplicate inst references created");
|
||||
ctx.map.def_entity(inst.into(), &opcode_loc).expect("duplicate inst references created");
|
||||
|
||||
if results.len() != num_results {
|
||||
return err!(self.loc,
|
||||
|
||||
Reference in New Issue
Block a user