[cfe-commits] r132855 - /cfe/trunk/lib/Frontend/InitPreprocessor.cpp
Nick Lewycky
nicholas at mxc.ca
Fri Jun 10 13:56:43 PDT 2011
Author: nicholas
Date: Fri Jun 10 15:56:43 2011
New Revision: 132855
URL: http://llvm.org/viewvc/llvm-project?rev=132855&view=rev
Log:
__OBJC__ is also a standard predefined macro.
Modified:
cfe/trunk/lib/Frontend/InitPreprocessor.cpp
Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=132855&r1=132854&r2=132855&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Fri Jun 10 15:56:43 2011
@@ -247,6 +247,9 @@
Builder.defineMacro("__cplusplus", "199711L");
}
+ if (LangOpts.ObjC1)
+ Builder.defineMacro("__OBJC__");
+
// Not "standard" per se, but available even with the -undef flag.
if (LangOpts.AsmPreprocessor)
Builder.defineMacro("__ASSEMBLER__");
@@ -295,7 +298,6 @@
Builder.defineMacro("__GXX_EXPERIMENTAL_CXX0X__");
if (LangOpts.ObjC1) {
- Builder.defineMacro("__OBJC__");
if (LangOpts.ObjCNonFragileABI) {
Builder.defineMacro("__OBJC2__");
Builder.defineMacro("OBJC_ZEROCOST_EXCEPTIONS");
More information about the cfe-commits
mailing list