base: Ensure that (UN)LIKELY macros use builtin on clang.

Currently, the LIKELY macros are guarded by COMPILER_GCC, which works
with clang except on windows. This patch ensures that all clang platforms
hit this.

[email protected], [email protected]

Change-Id: I1850b0d91dd552b468c9c84a4c072571dd811cb2
Reviewed-on: https://chromium-review.googlesource.com/658328
Reviewed-by: Daniel Cheng <[email protected]>
Commit-Queue: Vladimir Levin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#500750}
diff --git a/base/compiler_specific.h b/base/compiler_specific.h
index c817ca4..2b9cd02e 100644
--- a/base/compiler_specific.h
+++ b/base/compiler_specific.h
@@ -198,7 +198,7 @@
 
 // Macro for hinting that an expression is likely to be false.
 #if !defined(UNLIKELY)
-#if defined(COMPILER_GCC)
+#if defined(COMPILER_GCC) || defined(__clang__)
 #define UNLIKELY(x) __builtin_expect(!!(x), 0)
 #else
 #define UNLIKELY(x) (x)
@@ -206,7 +206,7 @@
 #endif  // !defined(UNLIKELY)
 
 #if !defined(LIKELY)
-#if defined(COMPILER_GCC)
+#if defined(COMPILER_GCC) || defined(__clang__)
 #define LIKELY(x) __builtin_expect(!!(x), 1)
 #else
 #define LIKELY(x) (x)