This patch updates Triple::isCompatibleWith to make armxx and thumbxx
triples compatible, as long as the subarch, vendor, os, envorionment and
object format match. Thumb/ARM code generation should be controlled
using the thumb-mode per-function target feature rather than by the
triple to allow mixing Thumb and ARM functions.
D33448 updates Clang's codegen to add thumb-mode for all functions with
armxx or thumbxx triples.
If we're going to do this in the IRMover, it would probably be more efficient to do this once over the whole source module, not just the symbols being linked in one by one, so that the checking etc only needs to be done once per module. Just walk over all the src module functions and apply the attribute.
I guess this is needed because it looks like thumb-mode is typically added in the MC time, but that is too late since these modules are already combined, right?
Is there a drawback to always adding the +/-thumb-mode attribute to thumb/arm modules earlier, like during clang CodeGen?