From fdc82ccb3f2b23a89e7002fe8238e1422b00f96a Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 9 Jan 2017 21:23:21 +0000 Subject: Vendor import of clang trunk r291476: https://llvm.org/svn/llvm-project/cfe/trunk@291476 --- test/CodeGen/thinlto_backend.ll | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/CodeGen/thinlto_backend.ll') diff --git a/test/CodeGen/thinlto_backend.ll b/test/CodeGen/thinlto_backend.ll index 89f4fc407fbc..ac0b3b76ef7d 100644 --- a/test/CodeGen/thinlto_backend.ll +++ b/test/CodeGen/thinlto_backend.ll @@ -12,6 +12,14 @@ ; 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 +; 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: llvm-nm %t4.o | FileCheck --check-prefix=CHECK-OBJ-IGNORE-EMPTY %s +; CHECK-OBJ-IGNORE-EMPTY: T f1 +; CHECK-OBJ-IGNORE-EMPTY: U f2 + ; Ensure f2 was imported ; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc ; RUN: llvm-nm %t3.o | FileCheck --check-prefix=CHECK-OBJ %s -- cgit v1.3