[llvm] r263860 - Add a test for r263577: "Add missing error handling in llvm-lto"
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 18 17:17:33 PDT 2016
Author: mehdi_amini
Date: Fri Mar 18 19:17:32 2016
New Revision: 263860
URL: http://llvm.org/viewvc/llvm-project?rev=263860&view=rev
Log:
Add a test for r263577: "Add missing error handling in llvm-lto"
On Rafael's suggestion!
(also fix a discrepancy between this error message format and the others)
From: Mehdi Amini <mehdi.amini at apple.com>
Modified:
llvm/trunk/test/tools/llvm-lto/error.ll
llvm/trunk/tools/llvm-lto/llvm-lto.cpp
Modified: llvm/trunk/test/tools/llvm-lto/error.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-lto/error.ll?rev=263860&r1=263859&r2=263860&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-lto/error.ll (original)
+++ llvm/trunk/test/tools/llvm-lto/error.ll Fri Mar 18 19:17:32 2016
@@ -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
Modified: llvm/trunk/tools/llvm-lto/llvm-lto.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-lto/llvm-lto.cpp?rev=263860&r1=263859&r2=263860&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-lto/llvm-lto.cpp (original)
+++ llvm/trunk/tools/llvm-lto/llvm-lto.cpp Fri Mar 18 19:17:32 2016
@@ -258,7 +258,7 @@ static void createCombinedModuleSummaryI
CurrentActivity = "loading file '" + Filename + "'";
ErrorOr<std::unique_ptr<ModuleSummaryIndex>> IndexOrErr =
llvm::getModuleSummaryIndexForFile(Filename, diagnosticHandler);
- error(IndexOrErr, "error: " + CurrentActivity);
+ error(IndexOrErr, "error " + CurrentActivity);
std::unique_ptr<ModuleSummaryIndex> Index = std::move(IndexOrErr.get());
CurrentActivity = "";
// Skip files without a module summary.
More information about the llvm-commits
mailing list