From: Teresa Johnson Date: Fri, 12 May 2017 19:32:17 +0000 (+0000) Subject: Remove ignore-empty-index-file option X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1038577776715bb998f92f35989e3fc2b4b620b8;p=clang Remove ignore-empty-index-file option Summary: Clang changes to remove this option and replace with a parameter always set in the context of a ThinLTO distributed backend. Depends on D33133. Reviewers: pcc Subscribers: mehdi_amini, eraman, cfe-commits Differential Revision: https://reviews.llvm.org/D33134 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302940 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 51c21c9f25..0f07169ac8 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -1073,7 +1073,8 @@ void clang::EmitBackendOutput(DiagnosticsEngine &Diags, // into memory and pass it into runThinLTOBackend, which will run the // function importer and invoke LTO passes. Expected> IndexOrErr = - llvm::getModuleSummaryIndexForFile(CGOpts.ThinLTOIndexFile); + llvm::getModuleSummaryIndexForFile(CGOpts.ThinLTOIndexFile, + /*IgnoreEmptyThinLTOIndexFile*/true); if (!IndexOrErr) { logAllUnhandledErrors(IndexOrErr.takeError(), errs(), "Error loading index file '" + diff --git a/test/CodeGen/thinlto_backend.ll b/test/CodeGen/thinlto_backend.ll index 813bb62c1a..86f30c0374 100644 --- a/test/CodeGen/thinlto_backend.ll +++ b/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