]> granicus.if.org Git - clang/commitdiff
Move some MIPS target macro definitions from class Mips32TargetInfoBase
authorSimon Atanasyan <satanasyan@mips.com>
Thu, 5 Apr 2012 19:28:31 +0000 (19:28 +0000)
committerSimon Atanasyan <satanasyan@mips.com>
Thu, 5 Apr 2012 19:28:31 +0000 (19:28 +0000)
to the base class MipsTargetInfoBase. These macros are applicable for both
32/64-bits targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154116 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp

index 26fdca2447f9b0c5783d20e3559c195ff39f91f7..8cf27b301e19c0ca718da35c00975eb84bd8378a 100644 (file)
@@ -3476,6 +3476,10 @@ public:
       Builder.defineMacro("__mips_hard_float", Twine(1));
     else
       llvm_unreachable("Invalid float ABI for Mips.");
+
+    Builder.defineMacro("_MIPS_SZPTR", Twine(getPointerWidth(0)));
+    Builder.defineMacro("_MIPS_SZINT", Twine(getIntWidth()));
+    Builder.defineMacro("_MIPS_SZLONG", Twine(getLongWidth()));
   }
 
   virtual void getTargetDefines(const LangOptions &Opts,
@@ -3586,10 +3590,6 @@ public:
                               MacroBuilder &Builder) const {
     MipsTargetInfoBase::getArchDefines(Opts, Builder);
 
-    Builder.defineMacro("_MIPS_SZPTR", Twine(getPointerWidth(0)));
-    Builder.defineMacro("_MIPS_SZINT", Twine(getIntWidth()));
-    Builder.defineMacro("_MIPS_SZLONG", Twine(getLongWidth()));
-
     if (ABI == "o32") {
       Builder.defineMacro("__mips_o32");
       Builder.defineMacro("_ABIO32", "1");