-funsigned-char sets __CHAR_UNSIGNED__
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63942 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 984cf1a..f4f3a0b 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -572,6 +572,9 @@
DefineBuiltinMacro(Buf, MacroBuf);
}
+ if (!TI.isCharSigned())
+ DefineBuiltinMacro(Buf, "__CHAR_UNSIGNED__");
+
// Build configuration options. FIXME: these should be controlled by
// command line options or something.
DefineBuiltinMacro(Buf, "__DYNAMIC__=1");