diff --git a/llvm/test/tools/llvm-lto/error.ll b/llvm/test/tools/llvm-lto/error.ll index 268b08187610..4a58fba7b79c 100644 --- a/llvm/test/tools/llvm-lto/error.ll +++ b/llvm/test/tools/llvm-lto/error.ll @@ -3,3 +3,6 @@ ; RUN: not llvm-lto --list-symbols-only %S/Inputs/empty.bc 2>&1 | FileCheck %s --check-prefix=CHECK-LIST ; CHECK-LIST: llvm-lto: error loading file '{{.*}}/Inputs/empty.bc': The file was not recognized as a valid object file + +; RUN: not llvm-lto --thinlto %S/Inputs/empty.bc 2>&1 | FileCheck %s --check-prefix=CHECK-THIN +; CHECK-THIN: llvm-lto: error loading file '{{.*}}/Inputs/empty.bc': The file was not recognized as a valid object file diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp index d6f3d8a39f37..16e6a9afc7d4 100644 --- a/llvm/tools/llvm-lto/llvm-lto.cpp +++ b/llvm/tools/llvm-lto/llvm-lto.cpp @@ -258,7 +258,7 @@ static void createCombinedModuleSummaryIndex() { CurrentActivity = "loading file '" + Filename + "'"; ErrorOr> IndexOrErr = llvm::getModuleSummaryIndexForFile(Filename, diagnosticHandler); - error(IndexOrErr, "error: " + CurrentActivity); + error(IndexOrErr, "error " + CurrentActivity); std::unique_ptr Index = std::move(IndexOrErr.get()); CurrentActivity = ""; // Skip files without a module summary.