Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: tools/gn/ninja_target_writer.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/gn/ninja_target_writer.cc
diff --git a/tools/gn/ninja_target_writer.cc b/tools/gn/ninja_target_writer.cc
index 2b30d6514398ed19ea43dd793e8addcb917a30b3..1c201ef751750c27bfc33f3df31a21ab0635d249 100644
--- a/tools/gn/ninja_target_writer.cc
+++ b/tools/gn/ninja_target_writer.cc
@@ -90,7 +90,8 @@ std::string NinjaTargetWriter::RunAndWriteFile(const Target* target) {
NinjaBinaryTargetWriter writer(target, rules);
writer.Run();
} else {
- CHECK(0) << "Output type of target not handled.";
+ // Output type of target not handled.
+ CHECK(0);
}
if (needs_file_write) {
@@ -181,9 +182,8 @@ void NinjaTargetWriter::WriteSharedVars(const SubstitutionBits& bits) {
OutputFile NinjaTargetWriter::WriteInputDepsStampAndGetDep(
const std::vector<const Target*>& extra_hard_deps) const {
- CHECK(target_->toolchain())
- << "Toolchain not set on target "
- << target_->label().GetUserVisibleName(true);
+ // Toolchain not set on target |target_->label().GetUserVisibleName(true)|.
+ CHECK(target_->toolchain());
// ----------
// Collect all input files that are input deps of this target. Knowing the
@@ -302,8 +302,8 @@ void NinjaTargetWriter::WriteStampForTarget(
// First validate that the target's dependency is a stamp file. Otherwise,
// we shouldn't have gotten here!
- CHECK(base::EndsWith(stamp_file.value(), ".stamp",
- base::CompareCase::INSENSITIVE_ASCII))
+ LOG_IF(FATAL, !base::EndsWith(stamp_file.value(), ".stamp",
+ base::CompareCase::INSENSITIVE_ASCII))
<< "Output should end in \".stamp\" for stamp file output. Instead got: "
<< "\"" << stamp_file.value() << "\"";

Powered by Google App Engine
This is Rietveld 408576698