From 9091389771f46e531c9c42012f8e0ab5c072e336 Mon Sep 17 00:00:00 2001 From: Simon Atanasyan Date: Thu, 5 Apr 2012 19:28:31 +0000 Subject: [PATCH] Move some MIPS target macro definitions from class Mips32TargetInfoBase 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 26fdca2447..8cf27b301e 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -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"); -- 2.40.0