[cfe-commits] r162852 - /cfe/trunk/lib/Basic/Targets.cpp

Simon Atanasyan satanasyan at mips.com
Wed Aug 29 12:14:59 PDT 2012


Author: atanasyan
Date: Wed Aug 29 14:14:58 2012
New Revision: 162852

URL: http://llvm.org/viewvc/llvm-project?rev=162852&view=rev
Log:
Factor out MIPS macro definitions common for all MIPS targets.

Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=162852&r1=162851&r2=162852&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Wed Aug 29 14:14:58 2012
@@ -3703,6 +3703,10 @@
 
   virtual void getArchDefines(const LangOptions &Opts,
                               MacroBuilder &Builder) const {
+    DefineStd(Builder, "mips", Opts);
+    Builder.defineMacro("_mips");
+    Builder.defineMacro("__REGISTER_PREFIX__", "");
+
     switch (FloatABI) {
     case HardFloat:
       Builder.defineMacro("__mips_hard_float", Twine(1));
@@ -3924,11 +3928,8 @@
   }
   virtual void getTargetDefines(const LangOptions &Opts,
                                 MacroBuilder &Builder) const {
-    DefineStd(Builder, "mips", Opts);
-    Builder.defineMacro("_mips");
     DefineStd(Builder, "MIPSEB", Opts);
     Builder.defineMacro("_MIPSEB");
-    Builder.defineMacro("__REGISTER_PREFIX__", "");
     getArchDefines(Opts, Builder);
   }
 };
@@ -3942,11 +3943,8 @@
   }
   virtual void getTargetDefines(const LangOptions &Opts,
                                 MacroBuilder &Builder) const {
-    DefineStd(Builder, "mips", Opts);
-    Builder.defineMacro("_mips");
     DefineStd(Builder, "MIPSEL", Opts);
     Builder.defineMacro("_MIPSEL");
-    Builder.defineMacro("__REGISTER_PREFIX__", "");
     getArchDefines(Opts, Builder);
   }
 };
@@ -4051,11 +4049,8 @@
   }
   virtual void getTargetDefines(const LangOptions &Opts,
                                 MacroBuilder &Builder) const {
-    DefineStd(Builder, "mips", Opts);
-    Builder.defineMacro("_mips");
     DefineStd(Builder, "MIPSEB", Opts);
     Builder.defineMacro("_MIPSEB");
-    Builder.defineMacro("__REGISTER_PREFIX__", "");
     getArchDefines(Opts, Builder);
   }
 };
@@ -4078,11 +4073,8 @@
   }
   virtual void getTargetDefines(const LangOptions &Opts,
                                 MacroBuilder &Builder) const {
-    DefineStd(Builder, "mips", Opts);
-    Builder.defineMacro("_mips");
     DefineStd(Builder, "MIPSEL", Opts);
     Builder.defineMacro("_MIPSEL");
-    Builder.defineMacro("__REGISTER_PREFIX__", "");
     getArchDefines(Opts, Builder);
   }
 };





More information about the cfe-commits mailing list