From 008949d389b050e003689c3a3391d6bc943b590a Mon Sep 17 00:00:00 2001 From: "csilvers+ctemplate@google.com" Date: Fri, 23 Sep 2011 17:06:24 +0000 Subject: [PATCH] Now that arena has moved from CHECK(0) to LOG(FATAL), change the opensource shims to be able to compile that. This is a bit of a hack. R=chandlerc DELTA=5 (5 added, 0 deleted, 0 changed) Revision created by MOE tool push_codebase. MOE_MIGRATION=3313 --- src/base/util.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/base/util.h b/src/base/util.h index 1e0c1f3..2d9f1db 100644 --- a/src/base/util.h +++ b/src/base/util.h @@ -103,6 +103,11 @@ inline To down_cast(From* f) { // so we only accept pointers #define EXPECT_FALSE(cond) CHECK(!(cond)) #define EXPECT_STREQ(a, b) CHECK(strcmp(a, b) == 0) #define ASSERT_TRUE(cond) EXPECT_TRUE(cond) +// LOG(FATAL) is an alias for CHECK(FALSE). We define FATAL, but no +// other value that is reasonable inside LOG(), so the compile will +// fail if someone tries to use LOG(DEBUG) or the like. +#define LOG(x) INTERNAL_DO_LOG_ ## x +#define INTERNAL_DO_LOG_FATAL CHECK(false) // These are used only in debug mode. #ifdef NDEBUG