diff --git a/clang/include/clang/Config/config.h.cmake b/clang/include/clang/Config/config.h.cmake index 40a6cb3a2e3e..7629ef9129b1 100644 --- a/clang/include/clang/Config/config.h.cmake +++ b/clang/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/clang/include/clang/Config/config.h.in b/clang/include/clang/Config/config.h.in index 450ea9b613e8..1530fefaa53d 100644 --- a/clang/include/clang/Config/config.h.in +++ b/clang/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. */