LLVM  14.0.0git
PDBExtras.h
Go to the documentation of this file.
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 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_DEBUGINFO_PDB_PDBEXTRAS_H
10 #define LLVM_DEBUGINFO_PDB_PDBEXTRAS_H
11 
12 #include "llvm/ADT/StringRef.h"
16 #include <cstdint>
17 #include <unordered_map>
18 
19 namespace llvm {
20 
21 namespace pdb {
22 
23 using TagStats = std::unordered_map<PDB_SymType, int>;
24 
30  const llvm::codeview::CPURegister &CpuReg);
33 raw_ostream &operator<<(raw_ostream &OS, const PDB_Checksum &Checksum);
34 raw_ostream &operator<<(raw_ostream &OS, const PDB_Lang &Lang);
39 
43 
45 
46 template <typename T>
47 void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent) {
48  OS << "\n";
49  OS.indent(Indent);
50  OS << Name << ": " << Value;
51 }
52 
53 } // end namespace pdb
54 
55 } // end namespace llvm
56 
57 #endif // LLVM_DEBUGINFO_PDB_PDBEXTRAS_H
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
StringRef.h
llvm::pdb::PDB_UdtType
PDB_UdtType
These values correspond to the UdtKind enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:310
llvm::pdb::PDB_LocType
PDB_LocType
These values correspond to the LocationType enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:292
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::pdb::VersionInfo
Definition: PDBTypes.h:386
llvm::pdb::PDB_SymType
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:243
llvm::pdb::PDB_DataKind
PDB_DataKind
These values correspond to the DataKind enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:228
llvm::codeview::CPURegister
Definition: CodeView.h:527
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::IndexedInstrProf::Version
const uint64_t Version
Definition: InstrProf.h:991
CodeView.h
PDBTypes.h
llvm::pdb::dumpSymbolField
void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent)
Definition: PDBExtras.h:47
llvm::pdb::PDB_VariantType
PDB_VariantType
Definition: PDBTypes.h:393
llvm::codeview::SourceLanguage
SourceLanguage
These values correspond to the CV_CFL_LANG enumeration, and are documented here: https://msdn....
Definition: CodeView.h:146
llvm::pdb::operator<<
raw_ostream & operator<<(raw_ostream &OS, const PDB_VariantType &Value)
Definition: PDBExtras.cpp:24
llvm::pdb::PDB_Machine
PDB_Machine
Definition: PDBTypes.h:125
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
uint32_t
llvm::pdb::PDB_BuiltinType
PDB_BuiltinType
These values correspond to the Basictype enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:335
llvm::pdb::TagStats
std::unordered_map< PDB_SymType, int > TagStats
Definition: PDBExtras.h:23
llvm::pdb::Variant
Definition: PDBTypes.h:410
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:52
Stats
block placement Basic Block Placement Stats
Definition: MachineBlockPlacement.cpp:3465
llvm::pdb::PDB_Checksum
PDB_Checksum
Specifies the hash algorithm that a source file from a PDB was hashed with.
Definition: PDBTypes.h:119
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::pdb::dumpPDBSourceCompression
raw_ostream & dumpPDBSourceCompression(raw_ostream &OS, uint32_t Compression)
Definition: PDBExtras.cpp:337
llvm::codeview::ThunkOrdinal
ThunkOrdinal
These values correspond to the THUNK_ORDINAL enumeration.
Definition: CodeView.h:551
llvm::pdb::PDB_MemberAccess
PDB_MemberAccess
Definition: PDBTypes.h:384
Machine
COFF::MachineTypes Machine
Definition: COFFYAML.cpp:366
llvm::raw_ostream::indent
raw_ostream & indent(unsigned NumSpaces)
indent - Insert 'NumSpaces' spaces.
Definition: raw_ostream.cpp:497
llvm::codeview::CallingConvention
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
Definition: CodeView.h:176
raw_ostream.h
llvm::Value
LLVM Value Representation.
Definition: Value.h:75