summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/LocaleGeneric.inc
Commit message (Collapse)AuthorAgeFilesLines
* Move generic isPrint and columnWidth implementations to a separate ↵Alexander Kornienko2013-09-041-387/+0
| | | | | | | | | | | | | | | | | | | | | header/source to allow using both generic and system-dependent versions on win32. Summary: This is needed so we can use generic columnWidthUTF8 in clang-format on win32 simultaneously with a separate system-dependent implementations of isPrint/columnWidth in TextDiagnostic.cpp to avoid attempts to print Unicode characters using narrow-character interfaces (which is not supported on Windows, and we'll have to figure out how to handle this). Reviewers: jordan_rose Reviewed By: jordan_rose CC: llvm-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1559 llvm-svn: 189952
* isCharInSet refactoring.Alexander Kornienko2013-08-291-5/+8
| | | | | | | | | | | | | | | | | | Summary: Made UnicodeCharSet a class, perform validity checking inside its constructor instead of each isCharInSet call, use std::binary_search instead of own implementation. This patch comes with a necessary change in clang (sent separately). Reviewers: jordan_rose, klimek Reviewed By: klimek CC: cfe-commits, rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1534 llvm-svn: 189582
* Changed isPrint for U+00AD SOFT HYPHEN to return true.Alexander Kornienko2013-08-081-183/+185
| | | | | | | | | | | | | | | | | Summary: This is consistent with MacOSX implementation, and most terminals actually display this character (checked on gnome-terminal, lxterminal, lxterm, Terminal.app, iterm2). Actually, this is in line with the ISO Latin 1 standard (ISO 8859-1), which defines it differently from the Unicode Standard. More information here: http://www.cs.tut.fi/~jkorpela/shy.html Reviewers: gribozavr, jordan_rose CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1310 llvm-svn: 187949
* Implemented llvm::sys::locale::columnWidth and isPrint for the case of ↵Alexander Kornienko2013-08-071-5/+370
| | | | | | | | | | | | | | | | | | | | | generic UTF8-capable terminal. Summary: This is a second attempt to get this right. After reading the Unicode Standard I came up with the code that uses definitions of "printable" and "column width" more suitable for terminal output (i.e. fixed-width fonts and special treatment of many control characters). The implementation here can probably be used for Windows and MacOS if someone can test it properly. The patch addresses PR14910. Reviewers: jordan_rose, gribozavr CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1253 llvm-svn: 187837
* C++ has newlines at the end of files (including include files).David Blaikie2012-04-171-1/+1
| | | | llvm-svn: 154962
* platform support for counting column widths and checking isprintSeth Cantrell2012-04-171-0/+17
llvm-svn: 154944
OpenPOWER on IntegriCloud