Remove `friend` classes from TypeCategoryMap
As far as I can tell, the only thing those friend classes access is the `ValueSP` typedef. Given that this is a map-ish class, with "Map" in its name, it doesn't seem like a stretch to make `KeyType`, `ValueType` and `ValueSP` public. More so when the public methods of the class have `KeyType` and `ValueSP` arguments and clearly `ValueSP` needs to be accessed from the outside. `friend` complicates local reasoning about who can access private members, which is valuable in a class like this that has every method locking a mutex to prevent concurrent access. Differential Revision: https://reviews.llvm.org/D126103
Loading
Please sign in to comment