[cfe-commits] r63920 - /cfe/trunk/lib/Lex/Preprocessor.cpp
Chris Lattner
sabre at nondot.org
Thu Feb 5 21:06:08 PST 2009
Author: lattner
Date: Thu Feb 5 23:06:07 2009
New Revision: 63920
URL: http://llvm.org/viewvc/llvm-project?rev=63920&view=rev
Log:
get __WCHAR_TYPE__ from the targetinfo hook
Modified:
cfe/trunk/lib/Lex/Preprocessor.cpp
Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=63920&r1=63919&r2=63920&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Thu Feb 5 23:06:07 2009
@@ -525,9 +525,6 @@
assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far");
DefineBuiltinMacro(Buf, "__CHAR_BIT__=8");
- DefineBuiltinMacro(Buf, "__WCHAR_TYPE__=int");
- DefineBuiltinMacro(Buf, "__WINT_TYPE__=int");
-
unsigned IntMaxWidth;
const char *IntMaxSuffix;
if (TI.getIntMaxType() == TargetInfo::SignedLongLong) {
@@ -554,7 +551,10 @@
DefineType("__UINTMAX_TYPE__", TI.getUIntMaxType(), Buf);
DefineType("__PTRDIFF_TYPE__", TI.getPtrDiffType(0), Buf);
DefineType("__SIZE_TYPE__", TI.getSizeType(), Buf);
-
+ DefineType("__WCHAR_TYPE__", TI.getWCharType(), Buf);
+ // FIXME: TargetInfo hookize __WINT_TYPE__.
+ DefineBuiltinMacro(Buf, "__WINT_TYPE__=int");
+
DefineFloatMacros(Buf, "FLT", &TI.getFloatFormat());
DefineFloatMacros(Buf, "DBL", &TI.getDoubleFormat());
DefineFloatMacros(Buf, "LDBL", &TI.getLongDoubleFormat());
More information about the cfe-commits
mailing list