r194296 - Use rauw for all discardable aliases, not just linkonce_odr.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Nov 21 09:50:28 PST 2013


> This breaks boost::locale and possibly other things. Attached is a test
> case. Compile with -O2 -std=c++11 before and after and look for
>     std::__1::moneypunct_byname<char, false>::~moneypunct_byname
> in the nm -C output.

I get an undefined reference in both cases.

Attached are the output of "clang  -O2 -S numeric.cc  -std=c++11 -w
-emit-llvm -Xclang -disable-llvm-optzns" with 3 versions of clang:
Just before this patch (old.ll), this patch (new.ll) and current trunk
(new2.ll). I have edit them just to put the entries in the same order
and removed the # attributes.

The changes I see are

old -> new:
 * Replace _ZNSt3__112_GLOBAL__N_11BD1Ev with
_ZNSt3__112_GLOBAL__N_11BD2Ev and then with
_ZNSt3__117moneypunct_bynameIcLb0EED2Ev. This seems valid, since the
first pass in an internal alias and the second one is just an internal
wrapper function
* Replace _ZNSt3__112_GLOBAL__N_11BC1Ev with
_ZNSt3__112_GLOBAL__N_11BC2Ev. Seems valid since it was an internal
alias.
* Drop the then unused internal aliases and functions.

new -> new2:

* Replace _ZNSt3__11AD2Ev with _ZNSt3__16locale5facetD2Ev. Seems valid
since it was a linkonce_odr wrapper function.

Cheers,
Rafael



More information about the cfe-commits mailing list