Don't define __CONSTANT_CFSTRINGS__ with -fno-constant-cfstrings issue.

Patch by Jean-Daniel Dupas.

llvm-svn: 134414
This commit is contained in:
Fariborz Jahanian
2011-07-05 16:00:59 +00:00
parent bbad3bceb7
commit bf3eec68dd

View File

@@ -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");