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
This commit is contained in:
James Molloy
2012-05-04 11:23:40 +00:00
parent 14316fcf7d
commit 222f27858f
3 changed files with 16 additions and 0 deletions

View File

@@ -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__");