summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-10-06 07:43:09 +0000
committerChris Lattner <sabre@nondot.org>2008-10-06 07:43:09 +0000
commit1b0a00a4c91ff137a45294625be2250478bedeb5 (patch)
tree1a1ef901b1d724ec4ef210832f1f79aa4cda232b /clang/lib
parenta97132a9c44d31dafa81db000340caed6218cee5 (diff)
downloadbcm5719-llvm-1b0a00a4c91ff137a45294625be2250478bedeb5.tar.gz
bcm5719-llvm-1b0a00a4c91ff137a45294625be2250478bedeb5.zip
__CONSTANT_CFSTRINGS__ should be defined even in C mode, otherwise the CFSTR
won't expand to the builtin. This fixes rdar://6248329 llvm-svn: 57164
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 6c5daae13bf..ed69e6f9336 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -488,12 +488,12 @@ static void InitializePredefinedMacros(Preprocessor &PP,
if (PP.getLangOptions().NeXTRuntime)
DefineBuiltinMacro(Buf, "__NEXT_RUNTIME__=1");
-
- // darwin_constant_cfstrings controls this. This is also dependent
- // on other things like the runtime I believe.
- DefineBuiltinMacro(Buf, "__CONSTANT_CFSTRINGS__=1");
}
+ // darwin_constant_cfstrings controls this. This is also dependent
+ // on other things like the runtime I believe. This is set even for C code.
+ DefineBuiltinMacro(Buf, "__CONSTANT_CFSTRINGS__=1");
+
if (PP.getLangOptions().ObjC2)
DefineBuiltinMacro(Buf, "OBJC_NEW_PROPERTIES");
OpenPOWER on IntegriCloud