We currently represent TOC entries by an MCSymbol. This is not
enough in some situations. For example, when accessing an
initialized TLS variable v on AIX using the general dynamic model, we
need to generate the two following entries for v:
.tc .v[TC],v@m .tc v[TC],v
One is for the region handle (with the @m relocation), the other is for
the variable offset.
This refactoring allows storing several entries for the same symbol
with different VariantKind in the TOC. If the VariantKind is not
specified, we default to VK_None.
The AIX TLS implementation using this refactoring to generate the two
entries will be posted in a subsequent patch.
I'm not sure why we need this, or even why this works ... IIUC MapVector creates a dense map from the key type to the index of the value. Shouldn't we be creating a DenseMapInfo of the key type which is now a std::pair<const MCSymbol *, MCSymbolRefExpr::VariantKind>?