summaryrefslogtreecommitdiff
path: root/external/bsd/llvm/dist/clang/test/CodeGen/thinlto_backend.ll
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2017-08-01 19:34:09 +0000
committerjoerg <joerg@NetBSD.org>2017-08-01 19:34:09 +0000
commit512f2fa596afb9c4a6a025d50cf6fcc61d9304e2 (patch)
tree13b95babd96062414a1a982935a17d5a7f2e4fce /external/bsd/llvm/dist/clang/test/CodeGen/thinlto_backend.ll
parentb5e3783314897bc6986dcd85a575c3b2fcc6be67 (diff)
Import clang r309604 from branches/release_50
Diffstat (limited to 'external/bsd/llvm/dist/clang/test/CodeGen/thinlto_backend.ll')
-rw-r--r--external/bsd/llvm/dist/clang/test/CodeGen/thinlto_backend.ll10
1 files changed, 7 insertions, 3 deletions
diff --git a/external/bsd/llvm/dist/clang/test/CodeGen/thinlto_backend.ll b/external/bsd/llvm/dist/clang/test/CodeGen/thinlto_backend.ll
index ac0b3b76ef7..86f30c0374f 100644
--- a/external/bsd/llvm/dist/clang/test/CodeGen/thinlto_backend.ll
+++ b/external/bsd/llvm/dist/clang/test/CodeGen/thinlto_backend.ll
@@ -12,10 +12,10 @@
; RUN: %clang -O2 -o %t4.o -x ir %t1.o -c -fthinlto-index=bad.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-ERROR1
; CHECK-ERROR1: Error loading index file 'bad.thinlto.bc'
-; Ensure we ignore empty index file under -ignore-empty-index-file, and run
-; non-ThinLTO compilation which would not import f2
+; Ensure we ignore empty index file, and run non-ThinLTO compilation which
+; would not import f2
; RUN: touch %t4.thinlto.bc
-; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t4.o -x ir %t1.o -c -fthinlto-index=%t4.thinlto.bc -mllvm -ignore-empty-index-file
+; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t4.o -x ir %t1.o -c -fthinlto-index=%t4.thinlto.bc
; RUN: llvm-nm %t4.o | FileCheck --check-prefix=CHECK-OBJ-IGNORE-EMPTY %s
; CHECK-OBJ-IGNORE-EMPTY: T f1
; CHECK-OBJ-IGNORE-EMPTY: U f2
@@ -35,8 +35,12 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
declare void @f2()
+declare i8* @f3()
define void @f1() {
call void @f2()
+ ; Make sure that the backend can handle undefined references.
+ ; Do an indirect call so that the undefined ref shows up in the combined index.
+ call void bitcast (i8*()* @f3 to void()*)()
ret void
}