File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ static auto FindAndDiagnoseImplLookupCycle(
184184}
185185
186186struct InterfacesFromConstantId {
187- llvm::SmallVector <SemIR::SpecificInterface> interfaces;
187+ llvm::ArrayRef <SemIR::SpecificInterface> interfaces;
188188 SemIR::BuiltinConstraintMask builtin_constraint_mask;
189189 bool other_requirements;
190190};
@@ -211,14 +211,9 @@ static auto GetInterfacesFromConstantId(
211211 if (!identified_id.has_value ()) {
212212 return std::nullopt ;
213213 }
214- // TODO: IdentifiedFacetTypes are held in a RelationalValueStore which does
215- // not protect against UAF through reallocation, so we must copy data out of
216- // it.
217- llvm::SmallVector<SemIR::SpecificInterface> interfaces (
218- context.identified_facet_types ()
219- .Get (identified_id)
220- .required_interfaces ());
221- return {{.interfaces = std::move (interfaces),
214+ return {{.interfaces = context.identified_facet_types ()
215+ .Get (identified_id)
216+ .required_interfaces (),
222217 .builtin_constraint_mask = facet_type_info.builtin_constraint_mask ,
223218 .other_requirements = facet_type_info.other_requirements }};
224219}
You can’t perform that action at this time.
0 commit comments