aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/Locale.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-12-20 19:53:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-12-20 19:53:05 +0000
commit0b57cec536236d46e3dba9bd041533462f33dbb7 (patch)
tree56229dbdbbf76d18580f72f789003db17246c8d9 /contrib/llvm-project/llvm/lib/Support/Locale.cpp
parent718ef55ec7785aae63f98f8ca05dc07ed399c16d (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/Locale.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/Locale.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/Locale.cpp b/contrib/llvm-project/llvm/lib/Support/Locale.cpp
new file mode 100644
index 000000000000..1b3300b90f2a
--- /dev/null
+++ b/contrib/llvm-project/llvm/lib/Support/Locale.cpp
@@ -0,0 +1,19 @@
+#include "llvm/Support/Locale.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Unicode.h"
+
+namespace llvm {
+namespace sys {
+namespace locale {
+
+int columnWidth(StringRef Text) {
+ return llvm::sys::unicode::columnWidthUTF8(Text);
+}
+
+bool isPrint(int UCS) {
+ return llvm::sys::unicode::isPrintable(UCS);
+}
+
+} // namespace locale
+} // namespace sys
+} // namespace llvm