diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-07-05 16:00:59 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-07-05 16:00:59 +0000 |
commit | 16c3eaeea209487ce688215736f0660fc530c17d (patch) | |
tree | 4750a17612986e63436fe115e0510d81c08737c9 /lib/Frontend/InitPreprocessor.cpp | |
parent | 7cd1de5cc0b28a7c6f09406e92f182f541572b43 (diff) |
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
Diffstat (limited to 'lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | lib/Frontend/InitPreprocessor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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"); |