summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2017-05-18 03:52:29 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2017-05-18 03:52:29 +0000
commitb10bff1183b8fcfe1a6625e353f9ebdef904ae7c (patch)
tree850d76db4879300cc179e9903eff7454f06da4a6 /llvm/test
parentfd3e39846d28bdc5e0e5c7918e245203c470b547 (diff)
downloadbcm5719-llvm-b10bff1183b8fcfe1a6625e353f9ebdef904ae7c.tar.gz
bcm5719-llvm-b10bff1183b8fcfe1a6625e353f9ebdef904ae7c.zip
[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
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/ThinLTO/X86/Inputs/merge-triple.ll1
-rw-r--r--llvm/test/ThinLTO/X86/merge-triple.ll10
2 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/ThinLTO/X86/Inputs/merge-triple.ll b/llvm/test/ThinLTO/X86/Inputs/merge-triple.ll
new file mode 100644
index 00000000000..ea644f5497b
--- /dev/null
+++ b/llvm/test/ThinLTO/X86/Inputs/merge-triple.ll
@@ -0,0 +1 @@
+target triple = "x86_64-apple-macosx10.11.0"
diff --git a/llvm/test/ThinLTO/X86/merge-triple.ll b/llvm/test/ThinLTO/X86/merge-triple.ll
new file mode 100644
index 00000000000..8f099d12a23
--- /dev/null
+++ b/llvm/test/ThinLTO/X86/merge-triple.ll
@@ -0,0 +1,10 @@
+; 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"
OpenPOWER on IntegriCloud