Implement a __WCHAR_UNSIGNED__ macro and use it to include WCHAR_MIN and
WCHAR_MAX in limits.h, thus solving the problem where the system header thinks it knows better. llvm-svn: 135455
This commit is contained in:
@@ -554,6 +554,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
|
||||
if (!TargetInfo::isTypeSigned(TI.getWIntType()))
|
||||
Builder.defineMacro("__WINT_UNSIGNED__");
|
||||
|
||||
if (!TargetInfo::isTypeSigned(TI.getWCharType()))
|
||||
Builder.defineMacro("__WCHAR_UNSIGNED__");
|
||||
|
||||
// Define exact-width integer types for stdint.h
|
||||
Builder.defineMacro("__INT" + llvm::Twine(TI.getCharWidth()) + "_TYPE__",
|
||||
"char");
|
||||
|
||||
Reference in New Issue
Block a user