Forgot DragonFlyBSD.

Hi eli.friedman, joerg, asl, atanasyan, jmolloy, t.p.northover, bkramer, rsmith,

http://llvm-reviews.chandlerc.com/D2021

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D2021?vs=5143&id=5144#toc

Files:
  lib/Basic/Targets.cpp
  lib/Headers/stdint.h
  lib/Sema/SemaType.cpp
  test/Preprocessor/init.c
  test/Preprocessor/stdint.c
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp
+++ lib/Basic/Targets.cpp
@@ -184,6 +184,21 @@
   DarwinTargetInfo(const llvm::Triple &Triple) : OSTargetInfo<Target>(Triple) {
     this->TLSSupported = Triple.isMacOSX() && !Triple.isMacOSXVersionLT(10, 7);
     this->MCountName = "\01mcount";
+    this->SizeType = TargetInfo::UnsignedLong;
+    this->IntPtrType = TargetInfo::SignedLong;
+    bool Is32BitArch = this->PointerWidth == 32;
+    if (Is32BitArch) {
+      this->PtrDiffType = TargetInfo::SignedInt;
+
+      this->IntMaxType = TargetInfo::SignedLongLong;
+      this->UIntMaxType = TargetInfo::UnsignedLongLong;
+    } else {
+      this->PtrDiffType = TargetInfo::SignedLong;
+
+      this->IntMaxType = TargetInfo::SignedLong;
+      this->UIntMaxType = TargetInfo::UnsignedLong;
+    }
+    this->Int64Type = TargetInfo::SignedLongLong;
   }
 
   virtual std::string isValidSectionSpecifier(StringRef SR) const {
@@ -235,6 +250,25 @@
       this->MCountName = ".mcount";
       break;
     }
+
+    bool Is32BitArch = this->PointerWidth == 32;
+    if (Is32BitArch) {
+      this->SizeType = TargetInfo::UnsignedInt;
+      this->IntPtrType = TargetInfo::SignedInt;
+      this->PtrDiffType = TargetInfo::SignedInt;
+
+      this->Int64Type = TargetInfo::SignedLongLong;
+      this->IntMaxType = TargetInfo::SignedLongLong;
+      this->UIntMaxType = TargetInfo::UnsignedLongLong;
+    } else {
+      this->SizeType = TargetInfo::UnsignedLong;
+      this->IntPtrType = TargetInfo::SignedLong;
+      this->PtrDiffType = TargetInfo::SignedLong;
+
+      this->Int64Type = TargetInfo::SignedLong;
+      this->IntMaxType = TargetInfo::SignedLong;
+      this->UIntMaxType = TargetInfo::UnsignedLong;
+    }
   }
 };
 
@@ -282,6 +316,25 @@
       this->MCountName = "__mcount";
       break;
     }
+
+    bool Is32BitArch = this->PointerWidth == 32;
+    if (Is32BitArch) {
+      this->SizeType = TargetInfo::UnsignedInt;
+      this->IntPtrType = TargetInfo::SignedInt;
+      this->PtrDiffType = TargetInfo::SignedInt;
+
+      this->Int64Type = TargetInfo::SignedLongLong;
+      this->IntMaxType = TargetInfo::SignedLongLong;
+      this->UIntMaxType = TargetInfo::UnsignedLongLong;
+    } else {
+      this->SizeType = TargetInfo::UnsignedLong;
+      this->IntPtrType = TargetInfo::SignedLong;
+      this->PtrDiffType = TargetInfo::SignedLong;
+
+      this->Int64Type = TargetInfo::SignedLong;
+      this->IntMaxType = TargetInfo::SignedLong;
+      this->UIntMaxType = TargetInfo::UnsignedLong;
+    }
   }
 };
 
@@ -354,6 +407,25 @@
   LinuxTargetInfo(const llvm::Triple &Triple) : OSTargetInfo<Target>(Triple) {
     this->UserLabelPrefix = "";
     this->WIntType = TargetInfo::UnsignedInt;
+
+    bool Is32BitArch = this->PointerWidth == 32;
+    if (Is32BitArch) {
+      this->SizeType = TargetInfo::UnsignedInt;
+      this->IntPtrType = TargetInfo::SignedInt;
+      this->PtrDiffType = TargetInfo::SignedInt;
+
+      this->Int64Type = TargetInfo::SignedLongLong;
+      this->IntMaxType = TargetInfo::SignedLongLong;
+      this->UIntMaxType = TargetInfo::UnsignedLongLong;
+    } else {
+      this->SizeType = TargetInfo::UnsignedLong;
+      this->IntPtrType = TargetInfo::SignedLong;
+      this->PtrDiffType = TargetInfo::SignedLong;
+
+      this->Int64Type = TargetInfo::SignedLong;
+      this->IntMaxType = TargetInfo::SignedLong;
+      this->UIntMaxType = TargetInfo::UnsignedLong;
+    }
   }
 
   virtual const char *getStaticInitSectionSpecifier() const {
@@ -377,6 +449,20 @@
 public:
   NetBSDTargetInfo(const llvm::Triple &Triple) : OSTargetInfo<Target>(Triple) {
     this->UserLabelPrefix = "";
+
+    bool Is32BitArch = this->PointerWidth == 32;
+    if (Is32BitArch) {
+      this->SizeType = TargetInfo::UnsignedInt;
+      this->IntPtrType = TargetInfo::SignedInt;
+      this->PtrDiffType = TargetInfo::SignedInt;
+    } else {
+      this->SizeType = TargetInfo::UnsignedLong;
+      this->IntPtrType = TargetInfo::SignedLong;
+      this->PtrDiffType = TargetInfo::SignedLong;
+    }
+    this->Int64Type = TargetInfo::SignedLongLong;
+    this->IntMaxType = TargetInfo::SignedLongLong;
+    this->UIntMaxType = TargetInfo::UnsignedLongLong;
   }
 };
 
@@ -414,6 +500,14 @@
           this->MCountName = "_mcount";
           break;
       }
+
+    this->SizeType = TargetInfo::UnsignedLong;
+    this->IntPtrType = TargetInfo::SignedLong;
+    this->PtrDiffType = TargetInfo::SignedLong;
+
+    this->Int64Type = TargetInfo::SignedLongLong;
+    this->IntMaxType = TargetInfo::SignedLongLong;
+    this->UIntMaxType = TargetInfo::UnsignedLongLong;
   }
 };
 
@@ -436,6 +530,14 @@
     this->UserLabelPrefix = "";
     this->TLSSupported = false;
     this->MCountName = "__mcount";
+
+    this->SizeType = TargetInfo::UnsignedLong;
+    this->IntPtrType = TargetInfo::SignedLong;
+    this->PtrDiffType = TargetInfo::SignedLong;
+
+    this->Int64Type = TargetInfo::SignedLongLong;
+    this->IntMaxType = TargetInfo::SignedLongLong;
+    this->UIntMaxType = TargetInfo::UnsignedLongLong;
   }
 };
 
@@ -519,8 +621,30 @@
   AuroraUXTargetInfo(const llvm::Triple &Triple)
       : OSTargetInfo<Target>(Triple) {
     this->UserLabelPrefix = "";
-    this->WCharType = this->SignedLong;
+
     // FIXME: WIntType should be SignedLong
+    bool Is32BitArch = this->PointerWidth == 32;
+    if (Is32BitArch) {
+      this->WCharType = TargetInfo::SignedLong;
+
+      this->SizeType = TargetInfo::UnsignedInt;
+      this->IntPtrType = TargetInfo::SignedInt;
+      this->PtrDiffType = TargetInfo::SignedInt;
+
+      this->Int64Type = TargetInfo::SignedLongLong;
+      this->IntMaxType = TargetInfo::SignedLongLong;
+      this->UIntMaxType = TargetInfo::UnsignedLongLong;
+    } else {
+      this->WCharType = TargetInfo::SignedInt;
+
+      this->SizeType = TargetInfo::SignedLong;
+      this->IntPtrType = TargetInfo::SignedLong;
+      this->PtrDiffType = TargetInfo::SignedLong;
+
+      this->Int64Type = TargetInfo::SignedLong;
+      this->IntMaxType = TargetInfo::SignedLong;
+      this->UIntMaxType = TargetInfo::UnsignedLong;
+    }
   }
 };
 
@@ -553,8 +677,27 @@
 public:
   SolarisTargetInfo(const llvm::Triple &Triple) : OSTargetInfo<Target>(Triple) {
     this->UserLabelPrefix = "";
-    this->WCharType = this->SignedInt;
     // FIXME: WIntType should be SignedLong
+    bool Is32BitArch = this->PointerWidth == 32;
+    if (Is32BitArch) {
+      this->WCharType = TargetInfo::SignedLong;
+
+      this->SizeType = TargetInfo::UnsignedInt;
+      this->PtrDiffType = TargetInfo::SignedInt;
+
+      this->Int64Type = TargetInfo::SignedLongLong;
+      this->IntMaxType = TargetInfo::SignedLongLong;
+      this->UIntMaxType = TargetInfo::UnsignedLongLong;
+    } else {
+      this->WCharType = TargetInfo::SignedInt;
+
+      this->SizeType = TargetInfo::SignedLong;
+      this->PtrDiffType = TargetInfo::SignedLong;
+
+      this->Int64Type = TargetInfo::SignedLong;
+      this->IntMaxType = TargetInfo::SignedLong;
+      this->UIntMaxType = TargetInfo::UnsignedLong;
+    }
   }
 };
 
@@ -1195,18 +1338,6 @@
     DescriptionString = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-"
                         "i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32";
 
-    switch (getTriple().getOS()) {
-    case llvm::Triple::Linux:
-    case llvm::Triple::FreeBSD:
-    case llvm::Triple::NetBSD:
-      SizeType = UnsignedInt;
-      PtrDiffType = SignedInt;
-      IntPtrType = SignedInt;
-      break;
-    default:
-      break;
-    }
-
     if (getTriple().getOS() == llvm::Triple::FreeBSD) {
       LongDoubleWidth = LongDoubleAlign = 64;
       LongDoubleFormat = &llvm::APFloat::IEEEdouble;
@@ -1263,7 +1394,6 @@
       : DarwinTargetInfo<PPC32TargetInfo>(Triple) {
     HasAlignMac68kSupport = true;
     BoolWidth = BoolAlign = 32; //XXX support -mone-byte-bool?
-    PtrDiffType = SignedInt;    // for http://llvm.org/bugs/show_bug.cgi?id=15726
     LongLongAlign = 32;
     SuitableAlign = 128;
     DescriptionString = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-"
@@ -2990,40 +3120,14 @@
 } // end anonymous namespace
 
 namespace {
-class OpenBSDI386TargetInfo : public OpenBSDTargetInfo<X86_32TargetInfo> {
-public:
-  OpenBSDI386TargetInfo(const llvm::Triple &Triple)
-      : OpenBSDTargetInfo<X86_32TargetInfo>(Triple) {
-    SizeType = UnsignedLong;
-    IntPtrType = SignedLong;
-    PtrDiffType = SignedLong;
-  }
-};
-} // end anonymous namespace
-
-namespace {
-class BitrigI386TargetInfo : public BitrigTargetInfo<X86_32TargetInfo> {
-public:
-  BitrigI386TargetInfo(const llvm::Triple &Triple)
-      : BitrigTargetInfo<X86_32TargetInfo>(Triple) {
-    SizeType = UnsignedLong;
-    IntPtrType = SignedLong;
-    PtrDiffType = SignedLong;
-  }
-};
-} // end anonymous namespace
-
-namespace {
 class DarwinI386TargetInfo : public DarwinTargetInfo<X86_32TargetInfo> {
 public:
   DarwinI386TargetInfo(const llvm::Triple &Triple)
       : DarwinTargetInfo<X86_32TargetInfo>(Triple) {
     LongDoubleWidth = 128;
     LongDoubleAlign = 128;
     SuitableAlign = 128;
     MaxVectorAlign = 256;
-    SizeType = UnsignedLong;
-    IntPtrType = SignedLong;
     DescriptionString = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-"
                         "i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-"
                         "a0:0:64-f80:128:128-n8:16:32-S128";
@@ -3342,37 +3446,12 @@
 public:
   DarwinX86_64TargetInfo(const llvm::Triple &Triple)
       : DarwinTargetInfo<X86_64TargetInfo>(Triple) {
-    Int64Type = SignedLongLong;
     MaxVectorAlign = 256;
   }
 };
 } // end anonymous namespace
 
 namespace {
-class OpenBSDX86_64TargetInfo : public OpenBSDTargetInfo<X86_64TargetInfo> {
-public:
-  OpenBSDX86_64TargetInfo(const llvm::Triple &Triple)
-      : OpenBSDTargetInfo<X86_64TargetInfo>(Triple) {
-    IntMaxType = SignedLongLong;
-    UIntMaxType = UnsignedLongLong;
-    Int64Type = SignedLongLong;
-  }
-};
-} // end anonymous namespace
-
-namespace {
-class BitrigX86_64TargetInfo : public BitrigTargetInfo<X86_64TargetInfo> {
-public:
-  BitrigX86_64TargetInfo(const llvm::Triple &Triple)
-      : BitrigTargetInfo<X86_64TargetInfo>(Triple) {
-    IntMaxType = SignedLongLong;
-    UIntMaxType = UnsignedLongLong;
-    Int64Type = SignedLongLong;
-  }
-};
-}
-
-namespace {
 class AArch64TargetInfo : public TargetInfo {
   static const char * const GCCRegNames[];
   static const TargetInfo::GCCRegAlias GCCRegAliases[];
@@ -3672,6 +3751,7 @@
     BigEndian = false;
     SizeType = UnsignedInt;
     PtrDiffType = SignedInt;
+    IntPtrType = SignedInt;
     // AAPCS 7.1.1, ARM-Linux ABI 2.4: type of wchar_t is unsigned int.
     WCharType = UnsignedInt;
 
@@ -4469,15 +4549,8 @@
                         "i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32:64-S128";
     // This is an LP64 platform.
     LongWidth = LongAlign = PointerWidth = PointerAlign = 64;
-
-    // OpenBSD uses long long for int64_t and intmax_t.
-    if (getTriple().getOS() == llvm::Triple::OpenBSD) {
-      IntMaxType = SignedLongLong;
-      UIntMaxType = UnsignedLongLong;
-    } else {
-      IntMaxType = SignedLong;
-      UIntMaxType = UnsignedLong;
-    }
+    IntMaxType = SignedLong;
+    UIntMaxType = UnsignedLong;
     Int64Type = IntMaxType;
   }
 
@@ -4500,25 +4573,6 @@
 } // end anonymous namespace.
 
 namespace {
-class AuroraUXSparcV8TargetInfo : public AuroraUXTargetInfo<SparcV8TargetInfo> {
-public:
-  AuroraUXSparcV8TargetInfo(const llvm::Triple &Triple)
-      : AuroraUXTargetInfo<SparcV8TargetInfo>(Triple) {
-    SizeType = UnsignedInt;
-    PtrDiffType = SignedInt;
-  }
-};
-class SolarisSparcV8TargetInfo : public SolarisTargetInfo<SparcV8TargetInfo> {
-public:
-  SolarisSparcV8TargetInfo(const llvm::Triple &Triple)
-      : SolarisTargetInfo<SparcV8TargetInfo>(Triple) {
-    SizeType = UnsignedInt;
-    PtrDiffType = SignedInt;
-  }
-};
-} // end anonymous namespace.
-
-namespace {
   class SystemZTargetInfo : public TargetInfo {
     static const char *const GCCRegNames[];
 
@@ -4994,6 +5048,7 @@
       : MipsTargetInfoBase(Triple, "o32", "mips32") {
     SizeType = UnsignedInt;
     PtrDiffType = SignedInt;
+    IntPtrType = SignedInt;
     MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32;
   }
   virtual bool setABI(const std::string &Name) {
@@ -5630,9 +5685,9 @@
     case llvm::Triple::Linux:
       return new LinuxTargetInfo<SparcV8TargetInfo>(Triple);
     case llvm::Triple::AuroraUX:
-      return new AuroraUXSparcV8TargetInfo(Triple);
+      return new AuroraUXTargetInfo<SparcV8TargetInfo>(Triple);
     case llvm::Triple::Solaris:
-      return new SolarisSparcV8TargetInfo(Triple);
+      return new SolarisTargetInfo<SparcV8TargetInfo>(Triple);
     case llvm::Triple::NetBSD:
       return new NetBSDTargetInfo<SparcV8TargetInfo>(Triple);
     case llvm::Triple::OpenBSD:
@@ -5686,9 +5741,9 @@
     case llvm::Triple::NetBSD:
       return new NetBSDI386TargetInfo(Triple);
     case llvm::Triple::OpenBSD:
-      return new OpenBSDI386TargetInfo(Triple);
+      return new OpenBSDTargetInfo<X86_32TargetInfo>(Triple);
     case llvm::Triple::Bitrig:
-      return new BitrigI386TargetInfo(Triple);
+      return new BitrigTargetInfo<X86_32TargetInfo>(Triple);
     case llvm::Triple::FreeBSD:
       return new FreeBSDTargetInfo<X86_32TargetInfo>(Triple);
     case llvm::Triple::KFreeBSD:
@@ -5727,9 +5782,9 @@
     case llvm::Triple::NetBSD:
       return new NetBSDTargetInfo<X86_64TargetInfo>(Triple);
     case llvm::Triple::OpenBSD:
-      return new OpenBSDX86_64TargetInfo(Triple);
+      return new OpenBSDTargetInfo<X86_64TargetInfo>(Triple);
     case llvm::Triple::Bitrig:
-      return new BitrigX86_64TargetInfo(Triple);
+      return new BitrigTargetInfo<X86_32TargetInfo>(Triple);
     case llvm::Triple::FreeBSD:
       return new FreeBSDTargetInfo<X86_64TargetInfo>(Triple);
     case llvm::Triple::KFreeBSD:
Index: lib/Headers/stdint.h
===================================================================
--- lib/Headers/stdint.h
+++ lib/Headers/stdint.h
@@ -254,23 +254,18 @@
 
 /* C99 7.18.1.4 Integer types capable of holding object pointers.
  */
-#define __stdint_join3(a,b,c) a ## b ## c
-
-#define  __intn_t(n) __stdint_join3( int, n, _t)
-#define __uintn_t(n) __stdint_join3(uint, n, _t)
-
 #ifndef _INTPTR_T
 #ifndef __intptr_t_defined
-typedef  __intn_t(__INTPTR_WIDTH__)  intptr_t;
+typedef signed __INTPTR_TYPE__ intptr_t;
 #define __intptr_t_defined
 #define _INTPTR_T
-#endif
-#endif
+#endif /* __intptr_t_defined */
+#endif /* _INTPTR_T */
 
 #ifndef _UINTPTR_T
-typedef __uintn_t(__INTPTR_WIDTH__) uintptr_t;
+typedef unsigned __INTPTR_TYPE__ uintptr_t;
 #define _UINTPTR_T
-#endif
+#endif /* _UINTPTR_T */
 
 /* C99 7.18.1.5 Greatest-width integer types.
  */
@@ -651,6 +646,7 @@
 #endif /* __INT_LEAST8_MIN */
 
 /* Some utility macros */
+#define __stdint_join3(a,b,c) a ## b ## c
 #define  __INTN_MIN(n)  __stdint_join3( INT, n, _MIN)
 #define  __INTN_MAX(n)  __stdint_join3( INT, n, _MAX)
 #define __UINTN_MAX(n)  __stdint_join3(UINT, n, _MAX)
Index: lib/Sema/SemaType.cpp
===================================================================
--- lib/Sema/SemaType.cpp
+++ lib/Sema/SemaType.cpp
@@ -4787,6 +4787,8 @@
          BTy->getKind() == BuiltinType::UShort ||
          BTy->getKind() == BuiltinType::Int ||
          BTy->getKind() == BuiltinType::UInt ||
+         BTy->getKind() == BuiltinType::Long ||
+         BTy->getKind() == BuiltinType::ULong ||
          BTy->getKind() == BuiltinType::LongLong ||
          BTy->getKind() == BuiltinType::ULongLong ||
          BTy->getKind() == BuiltinType::Float ||
Index: test/Preprocessor/init.c
===================================================================
--- test/Preprocessor/init.c
+++ test/Preprocessor/init.c
@@ -249,7 +249,7 @@
 // ARM:#define __INTMAX_MAX__ 9223372036854775807LL
 // ARM:#define __INTMAX_TYPE__ long long int
 // ARM:#define __INTMAX_WIDTH__ 64
-// ARM:#define __INTPTR_TYPE__ long int
+// ARM:#define __INTPTR_TYPE__ int
 // ARM:#define __INTPTR_WIDTH__ 32
 // ARM:#define __INT_MAX__ 2147483647
 // ARM:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
@@ -353,7 +353,7 @@
 // ARMEABISOFTFP:#define __INTMAX_MAX__ 9223372036854775807LL
 // ARMEABISOFTFP:#define __INTMAX_TYPE__ long long int
 // ARMEABISOFTFP:#define __INTMAX_WIDTH__ 64
-// ARMEABISOFTFP:#define __INTPTR_TYPE__ long int
+// ARMEABISOFTFP:#define __INTPTR_TYPE__ int
 // ARMEABISOFTFP:#define __INTPTR_WIDTH__ 32
 // ARMEABISOFTFP:#define __INT_MAX__ 2147483647
 // ARMEABISOFTFP:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
@@ -458,7 +458,7 @@
 // ARMEABIHARDFP:#define __INTMAX_MAX__ 9223372036854775807LL
 // ARMEABIHARDFP:#define __INTMAX_TYPE__ long long int
 // ARMEABIHARDFP:#define __INTMAX_WIDTH__ 64
-// ARMEABIHARDFP:#define __INTPTR_TYPE__ long int
+// ARMEABIHARDFP:#define __INTPTR_TYPE__ int
 // ARMEABIHARDFP:#define __INTPTR_WIDTH__ 32
 // ARMEABIHARDFP:#define __INT_MAX__ 2147483647
 // ARMEABIHARDFP:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
@@ -784,7 +784,7 @@
 // MIPS32BE:#define __INTMAX_MAX__ 9223372036854775807LL
 // MIPS32BE:#define __INTMAX_TYPE__ long long int
 // MIPS32BE:#define __INTMAX_WIDTH__ 64
-// MIPS32BE:#define __INTPTR_TYPE__ long int
+// MIPS32BE:#define __INTPTR_TYPE__ int
 // MIPS32BE:#define __INTPTR_WIDTH__ 32
 // MIPS32BE:#define __INT_MAX__ 2147483647
 // MIPS32BE:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
@@ -903,7 +903,7 @@
 // MIPS32EL:#define __INTMAX_MAX__ 9223372036854775807LL
 // MIPS32EL:#define __INTMAX_TYPE__ long long int
 // MIPS32EL:#define __INTMAX_WIDTH__ 64
-// MIPS32EL:#define __INTPTR_TYPE__ long int
+// MIPS32EL:#define __INTPTR_TYPE__ int
 // MIPS32EL:#define __INTPTR_WIDTH__ 32
 // MIPS32EL:#define __INT_MAX__ 2147483647
 // MIPS32EL:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
Index: test/Preprocessor/stdint.c
===================================================================
--- test/Preprocessor/stdint.c
+++ test/Preprocessor/stdint.c
@@ -28,8 +28,8 @@
 // ARM:typedef int8_t int_fast8_t;
 // ARM:typedef uint8_t uint_fast8_t;
 //
-// ARM:typedef int32_t intptr_t;
-// ARM:typedef uint32_t uintptr_t;
+// ARM:typedef signed int intptr_t;
+// ARM:typedef unsigned int uintptr_t;
 // 
 // ARM:typedef long long int intmax_t;
 // ARM:typedef long long unsigned int uintmax_t;
@@ -136,8 +136,8 @@
 // I386:typedef int8_t int_fast8_t;
 // I386:typedef uint8_t uint_fast8_t;
 //
-// I386:typedef int32_t intptr_t;
-// I386:typedef uint32_t uintptr_t;
+// I386:typedef signed int intptr_t;
+// I386:typedef unsigned int uintptr_t;
 //
 // I386:typedef long long int intmax_t;
 // I386:typedef long long unsigned int uintmax_t;
@@ -236,8 +236,8 @@
 // MSP430:typedef int8_t int_fast8_t;
 // MSP430:typedef uint8_t uint_fast8_t;
 //
-// MSP430:typedef int16_t intptr_t;
-// MSP430:typedef uint16_t uintptr_t;
+// MSP430:typedef signed int intptr_t;
+// MSP430:typedef unsigned int uintptr_t;
 //
 // MSP430:typedef long long int intmax_t;
 // MSP430:typedef long long unsigned int uintmax_t;
@@ -343,8 +343,8 @@
 // PPC64:typedef int8_t int_fast8_t;
 // PPC64:typedef uint8_t uint_fast8_t;
 //
-// PPC64:typedef int64_t intptr_t;
-// PPC64:typedef uint64_t uintptr_t;
+// PPC64:typedef signed long int intptr_t;
+// PPC64:typedef unsigned long int uintptr_t;
 //
 // PPC64:typedef long int intmax_t;
 // PPC64:typedef long unsigned int uintmax_t;
@@ -451,8 +451,8 @@
 // PPC:typedef int8_t int_fast8_t;
 // PPC:typedef uint8_t uint_fast8_t;
 //
-// PPC:typedef int32_t intptr_t;
-// PPC:typedef uint32_t uintptr_t;
+// PPC:typedef signed long int intptr_t;
+// PPC:typedef unsigned long int uintptr_t;
 //
 // PPC:typedef long long int intmax_t;
 // PPC:typedef long long unsigned int uintmax_t;
@@ -558,8 +558,8 @@
 // S390X:typedef int8_t int_fast8_t;
 // S390X:typedef uint8_t uint_fast8_t;
 //
-// S390X:typedef int64_t intptr_t;
-// S390X:typedef uint64_t uintptr_t;
+// S390X:typedef signed long int intptr_t;
+// S390X:typedef unsigned long int uintptr_t;
 //
 // S390X:typedef long long int intmax_t;
 // S390X:typedef long long unsigned int uintmax_t;
@@ -665,8 +665,8 @@
 // SPARC:typedef int8_t int_fast8_t;
 // SPARC:typedef uint8_t uint_fast8_t;
 //
-// SPARC:typedef int32_t intptr_t;
-// SPARC:typedef uint32_t uintptr_t;
+// SPARC:typedef signed long int intptr_t;
+// SPARC:typedef unsigned long int uintptr_t;
 //
 // SPARC:typedef long long int intmax_t;
 // SPARC:typedef long long unsigned int uintmax_t;
@@ -765,8 +765,8 @@
 // TCE:typedef int8_t int_fast8_t;
 // TCE:typedef uint8_t uint_fast8_t;
 //
-// TCE:typedef int32_t intptr_t;
-// TCE:typedef uint32_t uintptr_t;
+// TCE:typedef signed int intptr_t;
+// TCE:typedef unsigned int uintptr_t;
 //
 // TCE:typedef long int intmax_t;
 // TCE:typedef long unsigned int uintmax_t;
@@ -873,8 +873,8 @@
 // X86_64:typedef int8_t int_fast8_t;
 // X86_64:typedef uint8_t uint_fast8_t;
 //
-// X86_64:typedef int64_t intptr_t;
-// X86_64:typedef uint64_t uintptr_t;
+// X86_64:typedef signed long int intptr_t;
+// X86_64:typedef unsigned long int uintptr_t;
 //
 // X86_64:typedef long int intmax_t;
 // X86_64:typedef long unsigned int uintmax_t;
@@ -993,8 +993,8 @@
 // XCORE:typedef int8_t int_fast8_t;
 // XCORE:typedef uint8_t uint_fast8_t;
 //
-// XCORE:typedef int32_t intptr_t;
-// XCORE:typedef uint32_t uintptr_t;
+// XCORE:typedef signed long int intptr_t;
+// XCORE:typedef unsigned long int uintptr_t;
 //
 // XCORE:typedef long long int intmax_t;
 // XCORE:typedef long long unsigned int uintmax_t;
@@ -1077,9 +1077,9 @@
 // the identifiers used in the operations (int, uint, _t, INT, UINT, _MIN,
 // _MAX, and _C(v)) are themselves macros.
 //
-// RUN: %clang_cc1 -E -ffreestanding -U__UINTMAX_TYPE__ -U__INTMAX_TYPE__ -Dint=a -Duint=b -D_t=c -DINT=d -DUINT=e -D_MIN=f -D_MAX=g '-D_C(v)=h' -triple=i386-none-none %s | FileCheck -check-prefix JOIN %s
-// JOIN:typedef int32_t intptr_t;
-// JOIN:typedef uint32_t uintptr_t;
+// RUN: %clang_cc1 -E -ffreestanding -U __INTPTR_TYPE__ -U__UINTMAX_TYPE__ -U__INTMAX_TYPE__ -Dint=a -Duint=b -D_t=c -DINT=d -DUINT=e -D_MIN=f -D_MAX=g '-D_C(v)=h' -triple=i386-none-none %s | FileCheck -check-prefix JOIN %s
+// JOIN:typedef signed __INTPTR_TYPE__ intptr_t;
+// JOIN:typedef unsigned __INTPTR_TYPE__ uintptr_t;
 // JOIN:typedef __INTMAX_TYPE__ intmax_t;
 // JOIN:typedef __UINTMAX_TYPE__ uintmax_t;
 // JOIN:INTPTR_MIN_ (-2147483647 -1)
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to