diff options
author | James Molloy <james.molloy@arm.com> | 2012-05-04 11:23:40 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2012-05-04 11:23:40 +0000 |
commit | 222f27858f25a93ffea8a5d47669180344a03efc (patch) | |
tree | 2d14e4340e82135e32b77c722a7531292e6bf650 /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | 14316fcf7d525dcdcf6d3772cfaa7af24669dfed (diff) | |
download | llvm-222f27858f25a93ffea8a5d47669180344a03efc.zip llvm-222f27858f25a93ffea8a5d47669180344a03efc.tar.gz llvm-222f27858f25a93ffea8a5d47669180344a03efc.tar.bz2 |
Add a predefine __WINT_UNSIGNED__, similar to __WCHAR_UNSIGNED__, and test them both for ARM and X86.
Use this to fully fix Sema/format-strings.c for non-x86 platforms.
Reviewed by Chandler on IRC.
llvm-svn: 156169
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 4df7cfd..3d9d131 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -497,6 +497,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI, if (!LangOpts.CharIsSigned) Builder.defineMacro("__CHAR_UNSIGNED__"); + if (!TargetInfo::isTypeSigned(TI.getWCharType())) + Builder.defineMacro("__WCHAR_UNSIGNED__"); + if (!TargetInfo::isTypeSigned(TI.getWIntType())) Builder.defineMacro("__WINT_UNSIGNED__"); |