diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-06 05:06:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-06 05:06:07 +0000 |
commit | 3c3b155ea8dfa29954a689a855d537a9ff2f12af (patch) | |
tree | 2c824abec21d9aea9e5934407f9bd9494facf889 /lib/Lex/Preprocessor.cpp | |
parent | 2b5abf515f9696912452f431c7738691cf97f4f1 (diff) |
get __WCHAR_TYPE__ from the targetinfo hook
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index c1e852cd2a..9b5965ccc5 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/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()); |