From: Fariborz Jahanian Date: Tue, 5 Jul 2011 16:00:59 +0000 (+0000) Subject: Don't define __CONSTANT_CFSTRINGS__ with -fno-constant-cfstrings issue. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16c3eaeea209487ce688215736f0660fc530c17d;p=clang Don't define __CONSTANT_CFSTRINGS__ with -fno-constant-cfstrings issue. Patch by Jean-Daniel Dupas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134414 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp index 2276e16eb7..b07fb4395f 100644 --- a/lib/Frontend/InitPreprocessor.cpp +++ b/lib/Frontend/InitPreprocessor.cpp @@ -438,7 +438,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI, // darwin_constant_cfstrings controls this. This is also dependent // on other things like the runtime I believe. This is set even for C code. - Builder.defineMacro("__CONSTANT_CFSTRINGS__"); + if (!LangOpts.NoConstantCFStrings) + Builder.defineMacro("__CONSTANT_CFSTRINGS__"); if (LangOpts.ObjC2) Builder.defineMacro("OBJC_NEW_PROPERTIES");