aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2012-05-04 11:23:40 +0000
committerJames Molloy <james.molloy@arm.com>2012-05-04 11:23:40 +0000
commita30d8600b9b52922a92a90b30993564ba257537a (patch)
tree47156886647d4e482c33bd4461d1a2b7799473f3 /lib/Frontend/InitPreprocessor.cpp
parent392da48160bd92ceb486792780467cbfdb2d0e8c (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156169 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--lib/Frontend/InitPreprocessor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index 4df7cfd5be..3d9d1311c3 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/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__");