From: Vassil Vassilev Date: Mon, 6 Mar 2017 16:54:40 +0000 (+0000) Subject: [modules] Make GNUMode a normal language option to fix module compilation. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a1f41150f287f59d68338f562c2de20bcefab49;p=clang [modules] Make GNUMode a normal language option to fix module compilation. GNUMode shouldn't be a benign language option because it influences the resulting AST when checking for the existence of GNUMode-specific macro "linux" (e.g. by having code inside #ifdef linux). This patch marks it as a normal language option so it gets correctly passed to the compiler invocation for the used modules. The added test case illustrated this because it compiles without modules, but fails when using modules. Patch by Raphael Isemann (D30496)! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297030 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/LangOptions.def b/include/clang/Basic/LangOptions.def index d02909eb07..7126275503 100644 --- a/include/clang/Basic/LangOptions.def +++ b/include/clang/Basic/LangOptions.def @@ -107,7 +107,7 @@ LANGOPT(WChar , 1, CPlusPlus, "wchar_t keyword") LANGOPT(DeclSpecKeyword , 1, 0, "__declspec keyword") BENIGN_LANGOPT(DollarIdents , 1, 1, "'$' in identifiers") BENIGN_LANGOPT(AsmPreprocessor, 1, 0, "preprocessor in asm mode") -BENIGN_LANGOPT(GNUMode , 1, 1, "GNU extensions") +LANGOPT(GNUMode , 1, 1, "GNU extensions") LANGOPT(GNUKeywords , 1, 1, "GNU keywords") BENIGN_LANGOPT(ImplicitInt, 1, !C99 && !CPlusPlus, "C89 implicit 'int'") LANGOPT(Digraphs , 1, 0, "digraphs")