Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:45

0001 //===- PDBExtras.h - helper functions and classes for PDBs ------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_DEBUGINFO_PDB_PDBEXTRAS_H
0010 #define LLVM_DEBUGINFO_PDB_PDBEXTRAS_H
0011 
0012 #include "llvm/ADT/StringRef.h"
0013 #include "llvm/DebugInfo/CodeView/CodeView.h"
0014 #include "llvm/DebugInfo/PDB/PDBTypes.h"
0015 #include "llvm/Support/raw_ostream.h"
0016 #include <cstdint>
0017 #include <unordered_map>
0018 
0019 namespace llvm {
0020 
0021 namespace pdb {
0022 
0023 using TagStats = std::unordered_map<PDB_SymType, int>;
0024 
0025 raw_ostream &operator<<(raw_ostream &OS, const PDB_VariantType &Value);
0026 raw_ostream &operator<<(raw_ostream &OS, const PDB_CallingConv &Conv);
0027 raw_ostream &operator<<(raw_ostream &OS, const PDB_BuiltinType &Type);
0028 raw_ostream &operator<<(raw_ostream &OS, const PDB_DataKind &Data);
0029 raw_ostream &operator<<(raw_ostream &OS,
0030                         const llvm::codeview::CPURegister &CpuReg);
0031 raw_ostream &operator<<(raw_ostream &OS, const PDB_LocType &Loc);
0032 raw_ostream &operator<<(raw_ostream &OS, const codeview::ThunkOrdinal &Thunk);
0033 raw_ostream &operator<<(raw_ostream &OS, const PDB_Checksum &Checksum);
0034 raw_ostream &operator<<(raw_ostream &OS, const PDB_Lang &Lang);
0035 raw_ostream &operator<<(raw_ostream &OS, const PDB_SymType &Tag);
0036 raw_ostream &operator<<(raw_ostream &OS, const PDB_MemberAccess &Access);
0037 raw_ostream &operator<<(raw_ostream &OS, const PDB_UdtType &Type);
0038 raw_ostream &operator<<(raw_ostream &OS, const PDB_Machine &Machine);
0039 
0040 raw_ostream &operator<<(raw_ostream &OS, const Variant &Value);
0041 raw_ostream &operator<<(raw_ostream &OS, const VersionInfo &Version);
0042 raw_ostream &operator<<(raw_ostream &OS, const TagStats &Stats);
0043 
0044 raw_ostream& dumpPDBSourceCompression(raw_ostream& OS, uint32_t Compression);
0045 
0046 template <typename T>
0047 void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent) {
0048   OS << "\n";
0049   OS.indent(Indent);
0050   OS << Name << ": " << Value;
0051 }
0052 
0053 } // end namespace pdb
0054 
0055 } // end namespace llvm
0056 
0057 #endif // LLVM_DEBUGINFO_PDB_PDBEXTRAS_H