LCOV - code coverage report
Current view: top level - lib/DebugInfo - SyntaxHighlighting.h (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 2 2 100.0 %
Date: 2015-01-30 11:55:44 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===-- SyntaxHighlighting.h ------------------------------------*- C++ -*-===//
       2             : //
       3             : //                     The LLVM Compiler Infrastructure
       4             : //
       5             : // This file is distributed under the University of Illinois Open Source
       6             : // License. See LICENSE.TXT for details.
       7             : //
       8             : //===----------------------------------------------------------------------===//
       9             : 
      10             : #ifndef LLVM_LIB_DEBUGINFO_SYNTAXHIGHLIGHTING_H
      11             : #define LLVM_LIB_DEBUGINFO_SYNTAXHIGHLIGHTING_H
      12             : 
      13             : #include "llvm/Support/raw_ostream.h"
      14             : 
      15             : namespace llvm {
      16             : namespace dwarf {
      17             : namespace syntax {
      18             : 
      19             : // Symbolic names for various syntax elements.
      20             : enum HighlightColor { Address, String, Tag, Attribute, Enumerator };
      21             : 
      22             : /// An RAII object that temporarily switches an output stream to a
      23             : /// specific color.
      24             : class WithColor {
      25             :   llvm::raw_ostream &OS;
      26             : 
      27             : public:
      28             :   /// To be used like this: WithColor(OS, syntax::String) << "text";
      29             :   WithColor(llvm::raw_ostream &OS, enum HighlightColor Type);
      30             :   ~WithColor();
      31             : 
      32        6973 :   llvm::raw_ostream& get() { return OS; }
      33       14222 :   operator llvm::raw_ostream& () { return OS; }
      34             : };
      35             : }
      36             : }
      37             : }
      38             : 
      39             : #endif

Generated by: LCOV version 1.11