[llvm] c0a10b2 - llvm-reduce: Use WithColor in another place
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 27 16:15:08 PST 2023
Author: Matt Arsenault
Date: 2023-01-27T20:14:36-04:00
New Revision: c0a10b2772ec2ebaeffe00bf46fdb5e7f20e7529
URL: https://github.com/llvm/llvm-project/commit/c0a10b2772ec2ebaeffe00bf46fdb5e7f20e7529
DIFF: https://github.com/llvm/llvm-project/commit/c0a10b2772ec2ebaeffe00bf46fdb5e7f20e7529.diff
LOG: llvm-reduce: Use WithColor in another place
Use more consistently capitalized/colorized/punctuated error messages.
Added:
Modified:
llvm/tools/llvm-reduce/ReducerWorkItem.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-reduce/ReducerWorkItem.cpp b/llvm/tools/llvm-reduce/ReducerWorkItem.cpp
index 74107ad0f0b2..dc64b44a33ad 100644
--- a/llvm/tools/llvm-reduce/ReducerWorkItem.cpp
+++ b/llvm/tools/llvm-reduce/ReducerWorkItem.cpp
@@ -443,7 +443,8 @@ bool ReducerWorkItem::isReduced(const TestRunner &Test) const {
CurrentFilepath,
UseBitcode && !isMIR() ? sys::fs::OF_None : sys::fs::OF_Text);
if (EC) {
- errs() << "Error making unique filename: " << EC.message() << "!\n";
+ WithColor::error(errs(), Test.getToolName())
+ << "error making unique filename: " << EC.message() << '\n';
exit(1);
}
@@ -453,8 +454,9 @@ bool ReducerWorkItem::isReduced(const TestRunner &Test) const {
Out.os().close();
if (Out.os().has_error()) {
- errs() << "Error emitting bitcode to file '" << CurrentFilepath
- << "': " << Out.os().error().message();
+ WithColor::error(errs(), Test.getToolName())
+ << "error emitting bitcode to file '" << CurrentFilepath
+ << "': " << Out.os().error().message() << '\n';
exit(1);
}
More information about the llvm-commits
mailing list