This patch adds support for referencing different abbrev tables. We use
'ID' to distinguish abbrev tables and use 'AbbrevTableID' to explicitly
assign an abbrev table to compilation units.
The syntax is:
debug_abbrev: - ID: 0 Table: ... - ID: 1 Table: ... debug_info: - ... AbbrevTableID: 1 ## Reference the second abbrev table. - ... AbbrevTableID: 0 ## Reference the first abbrev table.
Something to consider here: the user-visible behaviour of this class is that this is a const operation, but because this method causes AbbrevTableID2Index to be populated on the first call, it technically isn't. I would say this is a reasonable use case for mutable - the cache (in this case AbbrevTableID2Index) is marked as mutable, and then you can continue to pass this class around as const.