]> granicus.if.org Git - clang/commitdiff
hookize wint_t's definition, patch by Edward O'Callaghan (from PR5233).
authorChris Lattner <sabre@nondot.org>
Wed, 21 Oct 2009 04:59:34 +0000 (04:59 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 21 Oct 2009 04:59:34 +0000 (04:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84740 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/TargetInfo.h
lib/Basic/TargetInfo.cpp
lib/Frontend/InitPreprocessor.cpp

index a1e0a17c882ef273c881aa34cd6d520b874771fe..5f0230bc4c4970e2e2bcdb915873ab014b581ea4 100644 (file)
@@ -83,7 +83,7 @@ public:
   };
 protected:
   IntType SizeType, IntMaxType, UIntMaxType, PtrDiffType, IntPtrType, WCharType,
-          Char16Type, Char32Type, Int64Type;
+          WIntType, Char16Type, Char32Type, Int64Type;
 public:
   IntType getSizeType() const { return SizeType; }
   IntType getIntMaxType() const { return IntMaxType; }
@@ -93,6 +93,7 @@ public:
   }
   IntType getIntPtrType() const { return IntPtrType; }
   IntType getWCharType() const { return WCharType; }
+  IntType getWIntType() const { return WIntType; }
   IntType getChar16Type() const { return Char16Type; }
   IntType getChar32Type() const { return Char32Type; }
   IntType getInt64Type() const { return Int64Type; }
index 9cd12493e7a494b19b7d8c3220006cfaeba0e198..f9e789c36d567f92fe9da8320a1fa689220b363b 100644 (file)
@@ -43,6 +43,7 @@ TargetInfo::TargetInfo(const std::string &T) : Triple(T) {
   UIntMaxType = UnsignedLongLong;
   IntPtrType = SignedLong;
   WCharType = SignedInt;
+  WIntType = SignedInt;
   Char16Type = UnsignedShort;
   Char32Type = UnsignedInt;
   Int64Type = SignedLongLong;
index 2c16da0b99987d27abea53fa56726d2bdd2bbb75..b1a0a5ee8d510179119472c95d1f3c90cebc35e0 100644 (file)
@@ -374,8 +374,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
   DefineType("__INTPTR_TYPE__", TI.getIntPtrType(), Buf);
   DefineType("__SIZE_TYPE__", TI.getSizeType(), Buf);
   DefineType("__WCHAR_TYPE__", TI.getWCharType(), Buf);
-  // FIXME: TargetInfo hookize __WINT_TYPE__.
-  DefineBuiltinMacro(Buf, "__WINT_TYPE__=int");
+  DefineType("__WINT_TYPE__", TI.getWIntType(), Buf);
 
   DefineFloatMacros(Buf, "FLT", &TI.getFloatFormat());
   DefineFloatMacros(Buf, "DBL", &TI.getDoubleFormat());