llvm-pdbdump: Add more comprehensive dumping of symbol types.
[oota-llvm.git] / include / llvm / DebugInfo / PDB / PDBExtras.h
1 //===- PDBExtras.h - helper functions and classes for PDBs -------*- 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_DEBUGINFO_PDB_PDBEXTRAS_H
11 #define LLVM_DEBUGINFO_PDB_PDBEXTRAS_H
12
13 #include <unordered_map>
14
15 #include "PDBTypes.h"
16
17 #include "llvm/Support/raw_ostream.h"
18
19 namespace llvm {
20 typedef std::unordered_map<PDB_SymType, int> TagStats;
21
22 struct stream_indent {
23   stream_indent(int IndentWidth) : Width(IndentWidth) {}
24   int Width;
25 };
26 raw_ostream &operator<<(raw_ostream &OS, const stream_indent &Indent);
27
28 raw_ostream &operator<<(raw_ostream &OS, const PDB_VariantType &Value);
29 raw_ostream &operator<<(raw_ostream &OS, const PDB_CallingConv &Conv);
30 raw_ostream &operator<<(raw_ostream &OS, const PDB_DataKind &Data);
31 raw_ostream &operator<<(raw_ostream &OS, const PDB_RegisterId &Reg);
32 raw_ostream &operator<<(raw_ostream &OS, const PDB_LocType &Loc);
33 raw_ostream &operator<<(raw_ostream &OS, const PDB_ThunkOrdinal &Thunk);
34 raw_ostream &operator<<(raw_ostream &OS, const PDB_Checksum &Checksum);
35 raw_ostream &operator<<(raw_ostream &OS, const PDB_Lang &Lang);
36 raw_ostream &operator<<(raw_ostream &OS, const PDB_SymType &Tag);
37 raw_ostream &operator<<(raw_ostream &OS, const PDB_BuiltinType &Type);
38 raw_ostream &operator<<(raw_ostream &OS, const PDB_UniqueId &Id);
39
40 raw_ostream &operator<<(raw_ostream &OS, const Variant &Value);
41 raw_ostream &operator<<(raw_ostream &OS, const VersionInfo &Version);
42 raw_ostream &operator<<(raw_ostream &OS, const TagStats &Stats);
43 }
44
45 #endif