From 512f2fa596afb9c4a6a025d50cf6fcc61d9304e2 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 1 Aug 2017 19:34:09 +0000 Subject: Import clang r309604 from branches/release_50 --- external/bsd/llvm/dist/clang/test/CodeGen/thinlto_backend.ll | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'external/bsd/llvm/dist/clang/test/CodeGen/thinlto_backend.ll') 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 } -- cgit