This fixes cases where dynamic classes produced RTTI data with external linkage, producing linker errors about duplicate symbols.
This touches code close to what was changed in SVN r244266, but this change doesn't break the tests added in that revision.
I have to admit that I have little clue about what I'm doing here and I'm not sure if the exact fix is correct (it feels very heavy handed).
Hopefully the testcase shows what this fixes at least; this fixes linker errors with pretty trivial setups, where one object file contains the definition of a class with a virtual method (making the class dynamic, which previously meant that the typeinfo was emitted with external linkage) and another object file references typeid(ThatClass) (which produced a linkonce_odr version of that class' typeinfo).