Currently, when we merge two triples that differ only in the minimum version number, we give a warning such as:
WARNING: Linking two modules of different target triples: 'thumbv7-apple-ios8.0.0' and 'thumbv7-apple-ios3.0.0'
This patch fixes LinkModules to stop warning and pick the triple with the larger version number in such case.
rdar://problem/16743513
I've run into this problem too when trying to link amdgcn triples with differing operating systems (e.g. amgcn-- and amdgcn--amdhsa).
Would it be possible to move this part into a separate function like you've done for triplesMatch(), so that it could be more easily updated for other targets.
Thanks,
Tom