blob: 3c9a19801f89a22d1ea17e62983fa70011a69891 [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001//===- 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 "llvm/DebugInfo/CodeView/CodeView.h"
14#include "llvm/DebugInfo/PDB/PDBTypes.h"
15#include <unordered_map>
16
17namespace llvm {
18
19class raw_ostream;
20
21namespace pdb {
22
23using TagStats = std::unordered_map<PDB_SymType, int>;
24
25raw_ostream &operator<<(raw_ostream &OS, const PDB_VariantType &Value);
26raw_ostream &operator<<(raw_ostream &OS, const PDB_CallingConv &Conv);
27raw_ostream &operator<<(raw_ostream &OS, const PDB_DataKind &Data);
28raw_ostream &operator<<(raw_ostream &OS, const codeview::RegisterId &Reg);
29raw_ostream &operator<<(raw_ostream &OS, const PDB_LocType &Loc);
30raw_ostream &operator<<(raw_ostream &OS, const codeview::ThunkOrdinal &Thunk);
31raw_ostream &operator<<(raw_ostream &OS, const PDB_Checksum &Checksum);
32raw_ostream &operator<<(raw_ostream &OS, const PDB_Lang &Lang);
33raw_ostream &operator<<(raw_ostream &OS, const PDB_SymType &Tag);
34raw_ostream &operator<<(raw_ostream &OS, const PDB_MemberAccess &Access);
35raw_ostream &operator<<(raw_ostream &OS, const PDB_UdtType &Type);
36raw_ostream &operator<<(raw_ostream &OS, const PDB_Machine &Machine);
37raw_ostream &operator<<(raw_ostream &OS,
38 const PDB_SourceCompression &Compression);
39
40raw_ostream &operator<<(raw_ostream &OS, const Variant &Value);
41raw_ostream &operator<<(raw_ostream &OS, const VersionInfo &Version);
42raw_ostream &operator<<(raw_ostream &OS, const TagStats &Stats);
43
44} // end namespace pdb
45
46} // end namespace llvm
47
48#endif // LLVM_DEBUGINFO_PDB_PDBEXTRAS_H