summaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Locale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/Locale.cpp')
-rw-r--r--llvm/lib/Support/Locale.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/lib/Support/Locale.cpp b/llvm/lib/Support/Locale.cpp
new file mode 100644
index 000000000000..1b3300b90f2a
--- /dev/null
+++ b/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