[ThinLTO] Do not assert when adding a module with a different but
authorAkira Hatanaka <ahatanaka@apple.com>
Thu, 18 May 2017 03:52:29 +0000 (03:52 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Thu, 18 May 2017 03:52:29 +0000 (03:52 +0000)
commitb10bff1183b8fcfe1a6625e353f9ebdef904ae7c
tree850d76db4879300cc179e9903eff7454f06da4a6
parentfd3e39846d28bdc5e0e5c7918e245203c470b547
[ThinLTO] Do not assert when adding a module with a different but
compatible target triple

Currently, an assertion fails in ThinLTOCodeGenerator::addModule when
the target triple of the module being added doesn't match that of the
one stored in TMBuilder. This patch relaxes the constraint and makes
changes to allow target triples that only differ in their version
numbers on Apple platforms, similarly to what r228999 did.

rdar://problem/30133904

Differential Revision: https://reviews.llvm.org/D33291

llvm-svn: 303326
llvm/include/llvm/ADT/Triple.h
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
llvm/lib/Linker/IRMover.cpp
llvm/lib/Support/Triple.cpp
llvm/test/ThinLTO/X86/Inputs/merge-triple.ll [new file with mode: 0644]
llvm/test/ThinLTO/X86/merge-triple.ll [new file with mode: 0644]