diff options
author | Sven van Haastregt <sven.vanhaastregt@arm.com> | 2018-08-23 09:42:58 +0000 |
---|---|---|
committer | Sven van Haastregt <sven.vanhaastregt@arm.com> | 2018-08-23 09:42:58 +0000 |
commit | 0dfbf6b6085bff1e0d77c16274a0e44fda314047 (patch) | |
tree | 2f089bfa3028a41f8ebe246447378f20b6ee39ac /llvm/lib/Support/Locale.cpp | |
parent | 6bcf2ba2f0fff179602fd60b5e0127cd20fc907e (diff) | |
download | bcm5719-llvm-0dfbf6b6085bff1e0d77c16274a0e44fda314047.tar.gz bcm5719-llvm-0dfbf6b6085bff1e0d77c16274a0e44fda314047.zip |
[Support] Fix some Wundef warnings
For the _WIN32 macro, it is the definedness that matters rather than
the value. Most uses of the macro already rely on the definedness.
This commit fixes the few remaining uses that relied on the value.
Differential Revision: https://reviews.llvm.org/D51105
llvm-svn: 340520
Diffstat (limited to 'llvm/lib/Support/Locale.cpp')
-rw-r--r-- | llvm/lib/Support/Locale.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Locale.cpp b/llvm/lib/Support/Locale.cpp index e57d377c9ab..c4cfc5e8de0 100644 --- a/llvm/lib/Support/Locale.cpp +++ b/llvm/lib/Support/Locale.cpp @@ -7,7 +7,7 @@ namespace sys { namespace locale { int columnWidth(StringRef Text) { -#if _WIN32 +#ifdef _WIN32 return Text.size(); #else return llvm::sys::unicode::columnWidthUTF8(Text); @@ -15,7 +15,7 @@ int columnWidth(StringRef Text) { } bool isPrint(int UCS) { -#if _WIN32 +#ifdef _WIN32 // Restrict characters that we'll try to print to the lower part of ASCII // except for the control characters (0x20 - 0x7E). In general one can not // reliably output code points U+0080 and higher using narrow character C/C++ |