Here is the patch that defines _MIPS_SZPTR, _MIPS_SZINT and _MIPS_SZLONG macros 
on mips32 platform. These macros are gcc built-ins and used in system headers.

The same macros should be defined for mips64 platform as well. So, probably, 
the better place for them is MipsTargetInfoBase::getArchDefines() method. But 
now I do not have access to 64-bits system and cannot test the code.

--
Simon
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp	(revision 144176)
+++ lib/Basic/Targets.cpp	(working copy)
@@ -3108,6 +3108,10 @@
   }
   virtual void getArchDefines(const LangOptions &Opts,
                               MacroBuilder &Builder) const {
+    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");
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to