llvm/test/ThinLTO/X86/merge-triple.ll
Akira Hatanaka 343e535d9c [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303326 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-18 03:52:29 +00:00

11 lines
479 B
LLVM

; RUN: opt -module-summary %s -o %t1.bc
; RUN: opt -module-summary %p/Inputs/merge-triple.ll -o %t2.bc
; RUN: llvm-lto -thinlto-action=optimize %t1.bc %t2.bc
; RUN: llvm-dis < %t1.bc.thinlto.imported.bc | FileCheck %s --check-prefix=CHECK1
; RUN: llvm-dis < %t2.bc.thinlto.imported.bc | FileCheck %s --check-prefix=CHECK2
target triple = "x86_64-apple-macosx10.12.0"
; CHECK1: target triple = "x86_64-apple-macosx10.12.0"
; CHECK2: target triple = "x86_64-apple-macosx10.11.0"