[cfe-commits] r53149 - in /cfe/trunk/lib: Basic/Targets.cpp Lex/Preprocessor.cpp
Nuno Lopes
nunoplopes at sapo.pt
Sat Jul 5 12:32:25 PDT 2008
Author: nlopes
Date: Sat Jul 5 14:32:25 2008
New Revision: 53149
URL: http://llvm.org/viewvc/llvm-project?rev=53149&view=rev
Log:
move the linux predefined macro definition to the TargetInfo, where it really belongs
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/lib/Lex/Preprocessor.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=53149&r1=53148&r2=53149&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Sat Jul 5 14:32:25 2008
@@ -48,6 +48,11 @@
Define(Defs, "__APPLE__");
Define(Defs, "__MACH__");
#endif
+
+/* FIXME. we may also need to distinguish between darwin and linux targets */
+#ifdef linux
+ Define(Defs, "linux");
+#endif
if (1) {// -fobjc-gc controls this.
Define(Defs, "__weak", "");
Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=53149&r1=53148&r2=53149&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Sat Jul 5 14:32:25 2008
@@ -433,11 +433,6 @@
DefineBuiltinMacro(Buf, "__FINITE_MATH_ONLY__=0");
DefineBuiltinMacro(Buf, "__NO_INLINE__=1");
DefineBuiltinMacro(Buf, "__PIC__=1");
-
-/* FIXME: this check should be moved to the configure process */
-#ifdef linux
- DefineBuiltinMacro(Buf, "linux=1");
-#endif
if (PP.getLangOptions().CPlusPlus) {
More information about the cfe-commits
mailing list