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

Unified Diff: sandbox/linux/bpf_dsl/codegen.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: sandbox/linux/bpf_dsl/codegen.cc
diff --git a/sandbox/linux/bpf_dsl/codegen.cc b/sandbox/linux/bpf_dsl/codegen.cc
index d88bd531a2f7d26f9e54db52650a0cf047adb243..c78285d1e8f26195c25654d7709d911941d32dda 100644
--- a/sandbox/linux/bpf_dsl/codegen.cc
+++ b/sandbox/linux/bpf_dsl/codegen.cc
@@ -80,7 +80,8 @@ CodeGen::Node CodeGen::AppendInstruction(uint16_t code,
Node jt,
Node jf) {
if (BPF_CLASS(code) == BPF_JMP) {
- CHECK_NE(BPF_JA, BPF_OP(code)) << "CodeGen inserts JAs as needed";
+ // CodeGen inserts JAs as needed
+ CHECK_NE(BPF_JA, BPF_OP(code));
// Optimally adding jumps is rather tricky, so we use a quick
// approximation: by artificially reducing |jt|'s range, |jt| will
@@ -90,15 +91,18 @@ CodeGen::Node CodeGen::AppendInstruction(uint16_t code,
return Append(code, k, Offset(jt), Offset(jf));
}
- CHECK_EQ(kNullNode, jf) << "Non-branch instructions shouldn't provide jf";
+ // Non-branch instructions shouldn't provide jf
+ CHECK_EQ(kNullNode, jf);
if (BPF_CLASS(code) == BPF_RET) {
- CHECK_EQ(kNullNode, jt) << "Return instructions shouldn't provide jt";
+ // Return instructions shouldn't provide jt
+ CHECK_EQ(kNullNode, jt);
} else {
// For non-branch/non-return instructions, execution always
// proceeds to the next instruction; so we need to arrange for
// that to be |jt|.
jt = WithinRange(jt, 0);
- CHECK_EQ(0U, Offset(jt)) << "ICE: Failed to setup next instruction";
+ // ICE: Failed to setup next instruction
+ CHECK_EQ(0U, Offset(jt));
}
return Append(code, k, 0, 0);
}
@@ -140,7 +144,8 @@ CodeGen::Node CodeGen::Append(uint16_t code, uint32_t k, size_t jt, size_t jf) {
}
size_t CodeGen::Offset(Node target) const {
- CHECK_LT(target, program_.size()) << "Bogus offset target node";
+ // Bogus offset target node
+ CHECK_LT(target, program_.size());
return (program_.size() - 1) - target;
}

Powered by Google App Engine
This is Rietveld 408576698