]> granicus.if.org Git - clang/commitdiff
Remove ignore-empty-index-file option
authorTeresa Johnson <tejohnson@google.com>
Fri, 12 May 2017 19:32:17 +0000 (19:32 +0000)
committerTeresa Johnson <tejohnson@google.com>
Fri, 12 May 2017 19:32:17 +0000 (19:32 +0000)
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

lib/CodeGen/BackendUtil.cpp
test/CodeGen/thinlto_backend.ll

index 51c21c9f25d540e73670c17e894c13082e7b6df2..0f07169ac8b0761989a287663cac9ebf253d645e 100644 (file)
@@ -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<std::unique_ptr<ModuleSummaryIndex>> IndexOrErr =
-        llvm::getModuleSummaryIndexForFile(CGOpts.ThinLTOIndexFile);
+        llvm::getModuleSummaryIndexForFile(CGOpts.ThinLTOIndexFile,
+                                           /*IgnoreEmptyThinLTOIndexFile*/true);
     if (!IndexOrErr) {
       logAllUnhandledErrors(IndexOrErr.takeError(), errs(),
                             "Error loading index file '" +
index 813bb62c1a291b7458c760e60fc92fb41b37123d..86f30c0374fc75027cd6aa3c7d6b0985d43568ea 100644 (file)
 ; 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