aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2023-09-07 15:19:47 +0000
committerGitHub <noreply@github.com>2023-09-07 17:19:47 +0200
commit9c4e0056785b34f00c02a08b9fceded9512c1f65 (patch)
treed449bea5e4e8af316ee54188110f705cca81d1b7
parent84e2fd7ee4a9bf76834151a802245bd0b6de8fd0 (diff)
downloadllvm-9c4e0056785b34f00c02a08b9fceded9512c1f65.zip
llvm-9c4e0056785b34f00c02a08b9fceded9512c1f65.tar.gz
llvm-9c4e0056785b34f00c02a08b9fceded9512c1f65.tar.bz2
[libc] customizable namespace 2/4 (#65471)
This implements the second step of https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079 Namely "Add a guard in `src/__support/common.h`"
-rw-r--r--libc/src/__support/common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/src/__support/common.h b/libc/src/__support/common.h
index 1cdd6fe..a6aaa4e 100644
--- a/libc/src/__support/common.h
+++ b/libc/src/__support/common.h
@@ -9,6 +9,10 @@
#ifndef LLVM_LIBC_SUPPORT_COMMON_H
#define LLVM_LIBC_SUPPORT_COMMON_H
+#ifndef LIBC_NAMESPACE
+#error "LIBC_NAMESPACE macro is not defined."
+#endif
+
#include "src/__support/macros/attributes.h"
#include "src/__support/macros/properties/architectures.h"