summaryrefslogtreecommitdiff
path: root/chromium/base/compiler_specific.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/compiler_specific.h')
-rw-r--r--chromium/base/compiler_specific.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/chromium/base/compiler_specific.h b/chromium/base/compiler_specific.h
index 339e9b74e9c..17e1f688419 100644
--- a/chromium/base/compiler_specific.h
+++ b/chromium/base/compiler_specific.h
@@ -187,4 +187,12 @@
#endif // defined(COMPILER_GCC)
#endif // !defined(UNLIKELY)
+// Compiler feature-detection.
+// clang.llvm.org/docs/LanguageExtensions.html#has-feature-and-has-extension
+#if defined(__has_feature)
+#define HAS_FEATURE(FEATURE) __has_feature(FEATURE)
+#else
+#define HAS_FEATURE(FEATURE) 0
+#endif
+
#endif // BASE_COMPILER_SPECIFIC_H_