summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-06 05:06:07 +0000
committerChris Lattner <sabre@nondot.org>2009-02-06 05:06:07 +0000
commitbba531ce99567c69d2745fa4461a59cf79fd4b28 (patch)
tree8719072f574dcb88c10cde61c0011024823f2f31 /clang/lib/Lex/Preprocessor.cpp
parenta91c30fdb08408fb340d344706d4ff7ad9a3d43b (diff)
downloadbcm5719-llvm-bba531ce99567c69d2745fa4461a59cf79fd4b28.tar.gz
bcm5719-llvm-bba531ce99567c69d2745fa4461a59cf79fd4b28.zip
get __WCHAR_TYPE__ from the targetinfo hook
llvm-svn: 63920
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index c1e852cd2a2..9b5965ccc51 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -525,9 +525,6 @@ static void InitializePredefinedMacros(Preprocessor &PP,
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 @@ static void InitializePredefinedMacros(Preprocessor &PP,
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());
OpenPOWER on IntegriCloud