[cfe-commits] r154116 - /cfe/trunk/lib/Basic/Targets.cpp
Simon Atanasyan
satanasyan at mips.com
Thu Apr 5 12:28:31 PDT 2012
Author: atanasyan
Date: Thu Apr 5 14:28:31 2012
New Revision: 154116
URL: http://llvm.org/viewvc/llvm-project?rev=154116&view=rev
Log:
Move some MIPS target macro definitions from class Mips32TargetInfoBase
to the base class MipsTargetInfoBase. These macros are applicable for both
32/64-bits 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=154116&r1=154115&r2=154116&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Apr 5 14:28:31 2012
@@ -3476,6 +3476,10 @@
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 @@
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");
More information about the cfe-commits
mailing list