[cfe-commits] r84740 - in /cfe/trunk: include/clang/Basic/TargetInfo.h lib/Basic/TargetInfo.cpp lib/Frontend/InitPreprocessor.cpp

Chris Lattner sabre at nondot.org
Tue Oct 20 21:59:40 PDT 2009


Author: lattner
Date: Tue Oct 20 23:59:34 2009
New Revision: 84740

URL: http://llvm.org/viewvc/llvm-project?rev=84740&view=rev
Log:
hookize wint_t's definition, patch by Edward O'Callaghan (from PR5233).


Modified:
    cfe/trunk/include/clang/Basic/TargetInfo.h
    cfe/trunk/lib/Basic/TargetInfo.cpp
    cfe/trunk/lib/Frontend/InitPreprocessor.cpp

Modified: cfe/trunk/include/clang/Basic/TargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TargetInfo.h?rev=84740&r1=84739&r2=84740&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/TargetInfo.h (original)
+++ cfe/trunk/include/clang/Basic/TargetInfo.h Tue Oct 20 23:59:34 2009
@@ -83,7 +83,7 @@
   };
 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 @@
   }
   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; }

Modified: cfe/trunk/lib/Basic/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/TargetInfo.cpp?rev=84740&r1=84739&r2=84740&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/TargetInfo.cpp (original)
+++ cfe/trunk/lib/Basic/TargetInfo.cpp Tue Oct 20 23:59:34 2009
@@ -43,6 +43,7 @@
   UIntMaxType = UnsignedLongLong;
   IntPtrType = SignedLong;
   WCharType = SignedInt;
+  WIntType = SignedInt;
   Char16Type = UnsignedShort;
   Char32Type = UnsignedInt;
   Int64Type = SignedLongLong;

Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=84740&r1=84739&r2=84740&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Tue Oct 20 23:59:34 2009
@@ -374,8 +374,7 @@
   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());





More information about the cfe-commits mailing list