From 8c3e414ef4a818a327c9b960fab9520fb99dc7cb Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Mon, 9 Jun 2014 19:09:28 +0000 Subject: [PATCH] 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 --- include/clang/Config/config.h.cmake | 6 +++++- include/clang/Config/config.h.in | 6 +++++- 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. */ -- 2.40.0