Uniquing Static Data Members
The clang dSYM contained more than 3,000 copies of llvm::StringRef, one in nearly every compile unit. The C++ One Definition Rule (ODR) allows the DWARF linker in dsymutil to emit a type only once. With DWARF 5 input, the parallel linker treated StringRef::npos as a global constant. Every unit that kept npos, also kept the whole StringRef class with it. Uniquing static data members with their classes made the dSYM more than 20% smaller. ...