]> granicus.if.org Git - clang/commitdiff
-funsigned-char sets __CHAR_UNSIGNED__
authorChris Lattner <sabre@nondot.org>
Fri, 6 Feb 2009 18:20:57 +0000 (18:20 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 6 Feb 2009 18:20:57 +0000 (18:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63942 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Preprocessor.cpp

index 984cf1aab82923e3bdbcf8f9694f14e97850aaa7..f4f3a0bfb6c9ba2d45d6034e7eb1ac706e7792f0 100644 (file)
@@ -572,6 +572,9 @@ static void InitializePredefinedMacros(Preprocessor &PP,
     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");