LLVM  8.0.1
SymbolDumper.h
Go to the documentation of this file.
1 //===-- SymbolDumper.h - CodeView symbol info dumper ------------*- 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_CODEVIEW_SYMBOLDUMPER_H
11 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLDUMPER_H
12 
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/ADT/StringSet.h"
18 
19 namespace llvm {
20 class ScopedPrinter;
21 
22 namespace codeview {
23 class TypeCollection;
24 
25 /// Dumper for CodeView symbol streams found in COFF object files and PDB files.
27 public:
29  CodeViewContainer Container,
30  std::unique_ptr<SymbolDumpDelegate> ObjDelegate, CPUType CPU,
31  bool PrintRecordBytes)
32  : W(W), Types(Types), Container(Container),
33  ObjDelegate(std::move(ObjDelegate)), CompilationCPUType(CPU),
34  PrintRecordBytes(PrintRecordBytes) {}
35 
36  /// Dumps one type record. Returns false if there was a type parsing error,
37  /// and true otherwise. This should be called in order, since the dumper
38  /// maintains state about previous records which are necessary for cross
39  /// type references.
41 
42  /// Dumps the type records in Data. Returns false if there was a type stream
43  /// parse error, and true otherwise.
45 
46  CPUType getCompilationCPUType() const { return CompilationCPUType; }
47 
48 private:
49  ScopedPrinter &W;
50  TypeCollection &Types;
51  CodeViewContainer Container;
52  std::unique_ptr<SymbolDumpDelegate> ObjDelegate;
53  CPUType CompilationCPUType;
54  bool PrintRecordBytes;
55 };
56 } // end namespace codeview
57 } // end namespace llvm
58 
59 #endif // LLVM_DEBUGINFO_CODEVIEW_SYMBOLDUMPER_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
CVSymbolDumper(ScopedPrinter &W, TypeCollection &Types, CodeViewContainer Container, std::unique_ptr< SymbolDumpDelegate > ObjDelegate, CPUType CPU, bool PrintRecordBytes)
Definition: SymbolDumper.h:28
Definition: BitVector.h:938
Dumper for CodeView symbol streams found in COFF object files and PDB files.
Definition: SymbolDumper.h:26
Error dump(CVRecord< SymbolKind > &Record)
Dumps one type record.
CPUType
These values correspond to the CV_CPU_TYPE_e enumeration, and are documented here: https://msdn...
Definition: CodeView.h:79
CPUType getCompilationCPUType() const
Definition: SymbolDumper.h:46
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158