diff --git a/test/Linker/Inputs/targettriple-a.ll b/test/Linker/Inputs/targettriple-a.ll new file mode 100644 index 00000000000..296d2df3ab6 --- /dev/null +++ b/test/Linker/Inputs/targettriple-a.ll @@ -0,0 +1 @@ +target triple = "e" diff --git a/test/Linker/Inputs/targettriple-b.ll b/test/Linker/Inputs/targettriple-b.ll new file mode 100644 index 00000000000..cca872ec966 --- /dev/null +++ b/test/Linker/Inputs/targettriple-b.ll @@ -0,0 +1 @@ +target triple = "E" diff --git a/test/Linker/targettriple.ll b/test/Linker/targettriple.ll new file mode 100644 index 00000000000..cf64e3f8729 --- /dev/null +++ b/test/Linker/targettriple.ll @@ -0,0 +1,14 @@ +; RUN: llvm-link %s %S/Inputs/targettriple-a.ll -S -o - 2>%t.a.err | FileCheck %s +; RUN: cat %t.a.err | not FileCheck %s 2>&1 | FileCheck --check-prefix=WARN-A %s + +; RUN: llvm-link %s %S/Inputs/targettriple-b.ll -S -o - 2>%t.b.err | FileCheck %s +; RUN: cat %t.b.err | FileCheck --check-prefix=WARN-B %s + +target triple = "e" + +; CHECK: target triple = "e" + +; this is a hack to check that llvm-link printed no warnings. +; WARN-A: FileCheck error: '-' is empty. + +; WARN-B: WARNING: Linking two modules of different target triples: