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

Generated by: LCOV version 1.13