LLVM
5.0.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
lib
DebugInfo
DWARF
SyntaxHighlighting.h
Go to the documentation of this file.
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
namespace
llvm {
14
15
class
raw_ostream;
16
17
namespace
dwarf {
18
namespace
syntax {
19
20
// Symbolic names for various syntax elements.
21
enum
HighlightColor
{
Address
,
String
,
Tag
,
Attribute
,
Enumerator
,
Macro
};
22
23
/// An RAII object that temporarily switches an output stream to a
24
/// specific color.
25
class
WithColor
{
26
raw_ostream
&OS;
27
28
public
:
29
/// To be used like this: WithColor(OS, syntax::String) << "text";
30
WithColor
(
raw_ostream
&OS,
enum
HighlightColor
Type
);
31
~WithColor
();
32
33
raw_ostream
&
get
() {
return
OS; }
34
operator
raw_ostream
& () {
return
OS; }
35
};
36
37
}
// end namespace syntax
38
}
// end namespace dwarf
39
40
}
// end namespace llvm
41
42
#endif // LLVM_LIB_DEBUGINFO_SYNTAXHIGHLIGHTING_H
llvm::dwarf::syntax::Address
Definition:
SyntaxHighlighting.h:21
llvm::dwarf::syntax::WithColor::WithColor
WithColor(raw_ostream &OS, enum HighlightColor Type)
To be used like this: WithColor(OS, syntax::String) << "text";.
Definition:
SyntaxHighlighting.cpp:23
llvm::dwarf::syntax::HighlightColor
HighlightColor
Definition:
SyntaxHighlighting.h:21
llvm::dwarf::syntax::Attribute
Definition:
SyntaxHighlighting.h:21
llvm::dwarf::syntax::Tag
Definition:
SyntaxHighlighting.h:21
llvm::dwarf::syntax::Enumerator
Definition:
SyntaxHighlighting.h:21
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed...
Definition:
Type.h:46
llvm::dwarf::syntax::String
Definition:
SyntaxHighlighting.h:21
llvm::dwarf::syntax::Macro
Definition:
SyntaxHighlighting.h:21
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition:
raw_ostream.h:44
llvm::dwarf::syntax::WithColor::~WithColor
~WithColor()
Definition:
SyntaxHighlighting.cpp:37
llvm::dwarf::syntax::WithColor
An RAII object that temporarily switches an output stream to a specific color.
Definition:
SyntaxHighlighting.h:25
Generated on Fri Sep 1 2017 14:13:35 for LLVM by
1.8.6