ahoppen added a comment.

I would prefer to use `std::shared_ptr<DirectoryLookup>` instead of `unsigned`. 
IIUC we already basically have a level of indirection because if we want to get 
the `DirectoryLookup`, we need to find it by its index in `SearchDirs`. And 
updating the indices just seems like a hack to me that can be solved more 
cleanly.

Wouldn’t we also need to update the indices in `SearchDirsUsage` and 
`ModuleToSearchDirIdx`? Or replace those by `std::shared_ptr<DirectoryLookup>` 
as well?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116750/new/

https://reviews.llvm.org/D116750

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to