From bf3eec68dd01d4f9b219c9be764e34cd1f8b4cf9 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Tue, 5 Jul 2011 16:00:59 +0000 Subject: Don't define __CONSTANT_CFSTRINGS__ with -fno-constant-cfstrings issue. Patch by Jean-Daniel Dupas. llvm-svn: 134414 --- clang/lib/Frontend/InitPreprocessor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Frontend/InitPreprocessor.cpp') diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 2276e16..b07fb43 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/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"); -- cgit v1.1