LCOV - code coverage report
Current view: top level - lib/Support - Locale.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 4 4 100.0 %
Date: 2018-07-13 00:08:38 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #include "llvm/Support/Locale.h"
       2             : #include "llvm/ADT/StringRef.h"
       3             : #include "llvm/Support/Unicode.h"
       4             : 
       5             : namespace llvm {
       6             : namespace sys {
       7             : namespace locale {
       8             : 
       9     2470203 : int columnWidth(StringRef Text) {
      10             : #if _WIN32
      11             :   return Text.size();
      12             : #else
      13     2470203 :   return llvm::sys::unicode::columnWidthUTF8(Text);
      14             : #endif
      15             : }
      16             : 
      17     4115578 : bool isPrint(int UCS) {
      18             : #if _WIN32
      19             :   // Restrict characters that we'll try to print to the lower part of ASCII
      20             :   // except for the control characters (0x20 - 0x7E). In general one can not
      21             :   // reliably output code points U+0080 and higher using narrow character C/C++
      22             :   // output functions in Windows, because the meaning of the upper 128 codes is
      23             :   // determined by the active code page in the console.
      24             :   return ' ' <= UCS && UCS <= '~';
      25             : #else
      26     4115578 :   return llvm::sys::unicode::isPrintable(UCS);
      27             : #endif
      28             : }
      29             : 
      30             : } // namespace locale
      31             : } // namespace sys
      32             : } // namespace llvm

Generated by: LCOV version 1.13