Migrate QueryableVarDef to indicies

This commit is contained in:
Jacob Dufault 2017-04-08 01:07:39 -07:00
parent fffb3d3fcc
commit 59c7d96ea7
2 changed files with 6 additions and 11 deletions

View File

@ -103,16 +103,11 @@ QueryableVarDef::DefUpdate MapIdToUsr(const IdMap& id_map, const IndexedVarDef::
QueryableVarDef::DefUpdate result(def.usr);
result.short_name = def.short_name;
result.qualified_name = def.qualified_name;
if (def.declaration)
result.declaration = MapIdToUsr(id_map, def.declaration.value());
if (def.definition_spelling)
result.definition_spelling = MapIdToUsr(id_map, def.definition_spelling.value());
if (def.definition_extent)
result.definition_extent = MapIdToUsr(id_map, def.definition_extent.value());
if (def.variable_type)
result.variable_type = MapIdToUsr(id_map, def.variable_type.value());
if (def.declaring_type)
result.declaring_type = MapIdToUsr(id_map, def.declaring_type.value());
result.declaration = id_map.ToQuery(def.declaration);
result.definition_spelling = id_map.ToQuery(def.definition_spelling);
result.definition_extent = id_map.ToQuery(def.definition_extent);
result.variable_type = id_map.ToQuery(def.variable_type);
result.declaring_type = id_map.ToQuery(def.declaring_type);
return result;
}

View File

@ -209,7 +209,7 @@ struct QueryableFuncDef {
};
struct QueryableVarDef {
using DefUpdate = VarDefDefinitionData<Usr, Usr, Usr, QueryableLocation>;
using DefUpdate = VarDefDefinitionData<QueryTypeId, QueryFuncId, QueryVarId, QueryableLocation>;
using UsesUpdate = MergeableUpdate<QueryableLocation>;
DefUpdate def;