[InstCombine] Signed saturation patterns
[llvm-core.git] / include / llvm / DebugInfo / PDB / PDBExtras.h
blob45aba013e7c8ecbe36a4f37b2e6a5bf13c0833d4
1 //===- PDBExtras.h - helper functions and classes for PDBs ------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_DEBUGINFO_PDB_PDBEXTRAS_H
10 #define LLVM_DEBUGINFO_PDB_PDBEXTRAS_H
12 #include "llvm/DebugInfo/CodeView/CodeView.h"
13 #include "llvm/DebugInfo/PDB/PDBTypes.h"
14 #include "llvm/Support/raw_ostream.h"
16 #include <unordered_map>
18 namespace llvm {
20 class raw_ostream;
22 namespace pdb {
24 using TagStats = std::unordered_map<PDB_SymType, int>;
26 raw_ostream &operator<<(raw_ostream &OS, const PDB_VariantType &Value);
27 raw_ostream &operator<<(raw_ostream &OS, const PDB_CallingConv &Conv);
28 raw_ostream &operator<<(raw_ostream &OS, const PDB_BuiltinType &Type);
29 raw_ostream &operator<<(raw_ostream &OS, const PDB_DataKind &Data);
30 raw_ostream &operator<<(raw_ostream &OS,
31 const llvm::codeview::CPURegister &CpuReg);
32 raw_ostream &operator<<(raw_ostream &OS, const PDB_LocType &Loc);
33 raw_ostream &operator<<(raw_ostream &OS, const codeview::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_MemberAccess &Access);
38 raw_ostream &operator<<(raw_ostream &OS, const PDB_UdtType &Type);
39 raw_ostream &operator<<(raw_ostream &OS, const PDB_Machine &Machine);
41 raw_ostream &operator<<(raw_ostream &OS, const Variant &Value);
42 raw_ostream &operator<<(raw_ostream &OS, const VersionInfo &Version);
43 raw_ostream &operator<<(raw_ostream &OS, const TagStats &Stats);
45 raw_ostream& dumpPDBSourceCompression(raw_ostream& OS, uint32_t Compression);
47 template <typename T>
48 void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent) {
49 OS << "\n";
50 OS.indent(Indent);
51 OS << Name << ": " << Value;
55 } // end namespace pdb
57 } // end namespace llvm
59 #endif // LLVM_DEBUGINFO_PDB_PDBEXTRAS_H