summaryrefslogtreecommitdiff
path: root/include/clang/Config
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-09 19:09:28 +0000
committerAlp Toker <alp@nuanti.com>2014-06-09 19:09:28 +0000
commit8c3e414ef4a818a327c9b960fab9520fb99dc7cb (patch)
tree658f8ffa94f7dde9d4f3e6890e8d0eb233faae43 /include/clang/Config
parent505bbb22d12c692b47a4ee777d77bfc455e701fa (diff)
downloadclang-8c3e414ef4a818a327c9b960fab9520fb99dc7cb.tar.gz
Disallow multiple inclusion of clang/Config/config.h
Internal config.h headers are only meant to be included from the main file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Config')
-rw-r--r--include/clang/Config/config.h.cmake6
-rw-r--r--include/clang/Config/config.h.in6
2 files changed, 10 insertions, 2 deletions
diff --git a/include/clang/Config/config.h.cmake b/include/clang/Config/config.h.cmake
index 40a6cb3a2e..7629ef9129 100644
--- a/include/clang/Config/config.h.cmake
+++ b/include/clang/Config/config.h.cmake
@@ -1,4 +1,8 @@
-#ifndef CONFIG_H
+/* This generated file is for internal use. Do not include it from headers. */
+
+#ifdef CONFIG_H
+#error config.h can only be included once
+#else
#define CONFIG_H
/* Bug report URL. */
diff --git a/include/clang/Config/config.h.in b/include/clang/Config/config.h.in
index 450ea9b613..1530fefaa5 100644
--- a/include/clang/Config/config.h.in
+++ b/include/clang/Config/config.h.in
@@ -1,4 +1,8 @@
-#ifndef CONFIG_H
+/* This generated file is for internal use. Do not include it from headers. */
+
+#ifdef CONFIG_H
+#error config.h can only be included once
+#else
#define CONFIG_H
/* Bug report URL. */