Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/cpu_features.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2022-01-14 19:06:30 +0300
committerGuillaume Chatelet <gchatelet@google.com>2022-01-14 19:06:30 +0300
commitaa642e573e91d379254c574b25f89f6ad909e7ec (patch)
tree21d0a52f190e342a262ac5b885c16e8ee6fe164f
parent5ed8ef4bbec90ce165cbb77457f42edebc44de51 (diff)
[NFC] Avoid polluting global scope
-rw-r--r--include/cpu_features_macros.h6
-rw-r--r--src/utils/list_cpu_features.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/include/cpu_features_macros.h b/include/cpu_features_macros.h
index 8f5c38c..d477167 100644
--- a/include/cpu_features_macros.h
+++ b/include/cpu_features_macros.h
@@ -232,11 +232,11 @@
// Communicates to the compiler that the block is unreachable
#if defined(CPU_FEATURES_COMPILER_CLANG) || defined(CPU_FEATURES_COMPILER_GCC)
-#define UNREACHABLE() __builtin_unreachable()
+#define CPU_FEATURES_UNREACHABLE() __builtin_unreachable()
#elif defined(CPU_FEATURES_COMPILER_MSC)
-#define UNREACHABLE() __assume(0)
+#define CPU_FEATURES_UNREACHABLE() __assume(0)
#else
-#define UNREACHABLE()
+#define CPU_FEATURES_UNREACHABLE()
#endif
#endif // CPU_FEATURES_INCLUDE_CPU_FEATURES_MACROS_H_
diff --git a/src/utils/list_cpu_features.c b/src/utils/list_cpu_features.c
index 4389f20..0b4eb7a 100644
--- a/src/utils/list_cpu_features.c
+++ b/src/utils/list_cpu_features.c
@@ -340,7 +340,7 @@ static Node* GetCacheTypeString(CacheType cache_type) {
case CPU_FEATURE_CACHE_PREFETCH:
return CreateConstantString("prefetch");
}
- UNREACHABLE();
+ CPU_FEATURES_UNREACHABLE();
}
static void AddCacheInfo(Node* root, const CacheInfo* cache_info) {