From: Alp Toker Date: Mon, 9 Jun 2014 19:09:28 +0000 (+0000) Subject: Disallow multiple inclusion of clang/Config/config.h X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c3e414ef4a818a327c9b960fab9520fb99dc7cb;p=clang 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 --- 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. */