]> granicus.if.org Git - clang/commitdiff
move the linux predefined macro definition to the TargetInfo, where it really belongs
authorNuno Lopes <nunoplopes@sapo.pt>
Sat, 5 Jul 2008 19:32:25 +0000 (19:32 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Sat, 5 Jul 2008 19:32:25 +0000 (19:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53149 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp
lib/Lex/Preprocessor.cpp

index 4cf7e7bb8aadbf01762a959247eef13adfc39463..ac48e23f759ee3b82ac883b127e4b01a645c714f 100644 (file)
@@ -48,6 +48,11 @@ public:
     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", "");
index 577e64a5cfeb09ebc208c14e52d615478759aa96..32ee8f0c817c8580777734db1f52e30cba6168a2 100644 (file)
@@ -433,11 +433,6 @@ static void InitializePredefinedMacros(Preprocessor &PP,
   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) {