https://reviews.llvm.org/D139069 made the entry in symbols for private aliases point directly to the aliasee. This caused a new symbol table entry to be created for the aliasee each time it appeared in symbols which
- Increases the number of symbols emitted (since the private aliases wouldn't have been emitted as their own symbol)
- Confuses dsymutil, which says stuff like:
<snip> warning: (x86_64) failed to insert symbol '_.str.422' in the debug map. warning: (x86_64) failed to insert symbol '_.str.423' in the debug map. warning: (x86_64) failed to insert symbol '_.str.424' in the debug map. warning: (x86_64) failed to insert symbol '_.str.425' in the debug map. warning: (x86_64) failed to insert symbol '_.str.426' in the debug map. <snip>
This change adds all symbols that have already been added to a set and checks against it to decide whether to add a symbol or not, which has a little bit of overhead (Chromium's base_unittests in ASAN configuration; as one might assume the difference is dwarfed in LTO builds). Not sure if this is significant enough to drop this approach and try something more complex.
+------------------------------------------------------------+ | x + + | |x * x + + | | |_________A_________| | | |________________A________________|| +------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 1.28 1.3 1.29 1.29 0.0070710678 + 5 1.29 1.32 1.31 1.31 0.012247449 Difference at 95.0% confidence 0.02 +/- 0.0145844 1.55039% +/- 1.13058% (Student's t, pooled s = 0.01)