LLVM: lib/DebugInfo/PDB/PDBExtras.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

11

12using namespace llvm;

14

15#define CASE_OUTPUT_ENUM_CLASS_STR(Class, Value, Str, Stream) \

16 case Class::Value: \

17 Stream << Str; \

18 break;

19

20#define CASE_OUTPUT_ENUM_CLASS_NAME(Class, Value, Stream) \

21 CASE_OUTPUT_ENUM_CLASS_STR(Class, Value, #Value, Stream)

22

25 switch (Type) {

37 default:

38 OS << "Unknown";

39 }

40 return OS;

41}

42

45 switch (Type) {

67 }

68 return OS;

69}

70

73 OS << "__";

74 switch (Conv) {

100 }

101 return OS;

102}

103

105 switch (Data) {

116 }

117 return OS;

118}

119

123 switch (CpuReg.Reg) {

124#define CV_REGISTERS_ARM

125#define CV_REGISTER(name, val) \

126 case codeview::RegisterId:📛 \

127 OS << #name; \

128 return OS;

129#include "llvm/DebugInfo/CodeView/CodeViewRegisters.def"

130#undef CV_REGISTER

131#undef CV_REGISTERS_ARM

132

133 default:

134 break;

135 }

137 switch (CpuReg.Reg) {

138#define CV_REGISTERS_ARM64

139#define CV_REGISTER(name, val) \

140 case codeview::RegisterId:📛 \

141 OS << #name; \

142 return OS;

143#include "llvm/DebugInfo/CodeView/CodeViewRegisters.def"

144#undef CV_REGISTER

145#undef CV_REGISTERS_ARM64

146

147 default:

148 break;

149 }

150 } else {

151 switch (CpuReg.Reg) {

152#define CV_REGISTERS_X86

153#define CV_REGISTER(name, val) \

154 case codeview::RegisterId:📛 \

155 OS << #name; \

156 return OS;

157#include "llvm/DebugInfo/CodeView/CodeViewRegisters.def"

158#undef CV_REGISTER

159#undef CV_REGISTERS_X86

160

161 default:

162 break;

163 }

164 }

165 OS << static_cast(CpuReg.Reg);

166 return OS;

167}

168

170 switch (Loc) {

182 "regrelaliasindir", OS)

183 default:

184 OS << "Unknown";

185 }

186 return OS;

187}

188

199 }

200 return OS;

201}

202

205 switch (Checksum) {

210 }

211 return OS;

212}

213

215 switch (Lang) {

241 }

242 return OS;

243}

244

246 switch (Tag) {

289 default:

290 OS << "Unknown SymTag " << uint32_t(Tag);

291 }

292 return OS;

293}

294

301 }

302 return OS;

303}

304

306 switch (Type) {

311 }

312 return OS;

313}

314

338 default:

339 OS << "Unknown";

340 }

341 return OS;

342}

343

346 switch (Compression) {

353 default:

354 OS << "Unknown (" << Compression << ")";

355 }

356 return OS;

357}

358

360 switch (Value.Type) {

361 case PDB_VariantType::Bool:

363 break;

364 case PDB_VariantType::Double:

366 break;

367 case PDB_VariantType::Int16:

369 break;

370 case PDB_VariantType::Int32:

372 break;

373 case PDB_VariantType::Int64:

375 break;

376 case PDB_VariantType::Int8:

377 OS << static_cast(Value.Value.Int8);

378 break;

379 case PDB_VariantType::Single:

381 break;

382 case PDB_VariantType::UInt16:

384 break;

385 case PDB_VariantType::UInt32:

387 break;

388 case PDB_VariantType::UInt64:

390 break;

391 case PDB_VariantType::UInt8:

392 OS << static_cast(Value.Value.UInt8);

393 break;

394 case PDB_VariantType::String:

396 break;

397 default:

399 }

400 return OS;

401}

402

405 OS << Version.Major << "." << Version.Minor << "." << Version.Build;

406 return OS;

407}

408

410 for (auto Tag : Stats) {

411 OS << Tag.first << ":" << Tag.second << " ";

412 }

413 return OS;

414}

static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")

COFF::MachineTypes Machine

block placement Basic Block Placement Stats

Class to represent array types.

This is an important base class in LLVM.

Class to represent pointers.

A class that wrap the SHA1 algorithm.

The instances of the Type class are immutable: once they are created, they are never changed.

LLVM Value Representation.

Value(Type *Ty, unsigned scid)

Base class of all SIMD vector types.

This class implements an extremely fast bulk output stream that can only output to a stream.

@ Swift

Calling convention for Swift.

@ C

The default llvm calling convention, compatible with C.

CallingConvention

These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...

ThunkOrdinal

These values correspond to the THUNK_ORDINAL enumeration.

SourceLanguage

These values correspond to the CV_CFL_LANG enumeration in the Microsoft Debug Interface Access SDK,...

PDB_Checksum

Specifies the hash algorithm that a source file from a PDB was hashed with.

std::unordered_map< PDB_SymType, int > TagStats

PDB_BuiltinType

These values correspond to the Basictype enumeration, and are documented here: https://msdn....

PDB_UdtType

These values correspond to the UdtKind enumeration, and are documented here: https://msdn....

PDB_SymType

These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....

PDB_LocType

These values correspond to the LocationType enumeration, and are documented here: https://msdn....

raw_ostream & operator<<(LinePrinter &Printer, const T &Item)

PDB_DataKind

These values correspond to the DataKind enumeration, and are documented here: https://msdn....

raw_ostream & dumpPDBSourceCompression(raw_ostream &OS, uint32_t Compression)

This is an optimization pass for GlobalISel generic memory operations.

std::tuple< uint64_t, uint32_t > InlineSite

Holds functions to get, set or test bitfields.