Ensure that we can internalize values produced from two rounds of
promotion.
Note that this cannot happen currently via clang, but in other use cases
such as the Rust compiler which does a first round of ThinLTO on library
code, producing bitcode, and a second round on the final binary.
In particular this can happen if a function is exported and promoted,
ending up with a ".llvm.${hash}" suffix, and then goes through a round
of optimization creating an internal switch table expansion variable
that is internal and contains the promoted name of the enclosing
function. This variable will be promoted in the second round of ThinLTO
if @foo is imported again, and therefore ends up with two
".llvm.${hash}" suffixes. Only the final one should be stripped when
consulting the index to locate the summary.
I see that the patch and test descriptions are already very informative about why two rounds of promotion is possible and why rightmost split off is needed for internalizing. Maybe briefly mention two rounds of promotion here to let the reader conveniently know which side chose to split off is not arbitrary.