summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/Support/Locale.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-06-23 21:36:31 +0000
committerpatrick <patrick@openbsd.org>2019-06-23 21:36:31 +0000
commit23f101f37937a1bd4a29726cab2f76e0fb038b35 (patch)
treef7da7d6b32c2e07114da399150bfa88d72187012 /gnu/llvm/lib/Support/Locale.cpp
parentsort previous; ok deraadt (diff)
downloadwireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.tar.xz
wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.zip
Import LLVM 8.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/Support/Locale.cpp')
-rw-r--r--gnu/llvm/lib/Support/Locale.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/gnu/llvm/lib/Support/Locale.cpp b/gnu/llvm/lib/Support/Locale.cpp
index e57d377c9ab..1b3300b90f2 100644
--- a/gnu/llvm/lib/Support/Locale.cpp
+++ b/gnu/llvm/lib/Support/Locale.cpp
@@ -7,24 +7,11 @@ namespace sys {
namespace locale {
int columnWidth(StringRef Text) {
-#if _WIN32
- return Text.size();
-#else
return llvm::sys::unicode::columnWidthUTF8(Text);
-#endif
}
bool isPrint(int UCS) {
-#if _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++
- // output functions in Windows, because the meaning of the upper 128 codes is
- // determined by the active code page in the console.
- return ' ' <= UCS && UCS <= '~';
-#else
return llvm::sys::unicode::isPrintable(UCS);
-#endif
}
} // namespace locale