| Index: base/logging.h
|
| diff --git a/base/logging.h b/base/logging.h
|
| index 07674698e0220dbd7d2ab1662556e2853adc275d..78d68c70ab90f7504c9f56d9b01c53a569755167 100644
|
| --- a/base/logging.h
|
| +++ b/base/logging.h
|
| @@ -354,10 +354,18 @@ const LogSeverity LOG_0 = LOG_ERROR;
|
| #define VLOG_IS_ON(verboselevel) \
|
| ((verboselevel) <= ::logging::GetVlogLevel(__FILE__))
|
|
|
| +#if !defined(LIKELY)
|
| +#if defined(COMPILER_GCC)
|
| +#define LIKELY(x) __builtin_expect(!!(x), 1)
|
| +#else
|
| +#define LIKELY(x) (x)
|
| +#endif // defined(COMPILER_GCC)
|
| +#endif // !defined(LIKELY)
|
| +
|
| // Helper macro which avoids evaluating the arguments to a stream if
|
| // the condition doesn't hold. Condition is evaluated once and only once.
|
| #define LAZY_STREAM(stream, condition) \
|
| - !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
|
| + LIKELY(!(condition)) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
|
|
|
| // We use the preprocessor's merging operator, "##", so that, e.g.,
|
| // LOG(INFO) becomes the token COMPACT_GOOGLE_LOG_INFO. There's some funny
|
|
|