================
@@ -94,6 +106,9 @@ class MemIndex : public SymbolIndex {
static_assert(sizeof(RelationKind) == sizeof(uint8_t),
"RelationKind should be of same size as a uint8_t");
llvm::DenseMap<std::pair<SymbolID, uint8_t>, std::vector<SymbolID>>
Relations;
+ // Reverse relations, currently only for OverridenBy
+ llvm::DenseMap<std::pair<SymbolID, uint8_t>, std::vector<SymbolID>>
----------------
HighCommander4 wrote:
After giving this some more thought, let's keep things generic, i.e. keep the
key `std::pair<SymbolID, uint8_t>`. As our numbers show, the memory footprint
of this data structure is sufficiently small that any additional savings don't
give us much.
(I can think of use cases for wanting reverse relations even for the other
already-existing `RelationKind`, `BaseOf`: it would allow us to show base
classes in type hierarchy when invoked on a forward declaration.)
https://github.com/llvm/llvm-project/pull/163024
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits