Skip to content
Commit f0a61c2c authored by Jorge Gorbe Moya's avatar Jorge Gorbe Moya
Browse files

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
parent bedd3ee8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment