LLVM  8.0.1
DebugSymbolsSubsection.h
Go to the documentation of this file.
1 //===- DebugSymbolsSubsection.h --------------------------------*- 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_DEBUGSYMBOLSSUBSECTION_H
11 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLSSUBSECTION_H
12 
15 #include "llvm/Support/Error.h"
16 
17 namespace llvm {
18 namespace codeview {
20 public:
23 
24  static bool classof(const DebugSubsectionRef *S) {
25  return S->kind() == DebugSubsectionKind::Symbols;
26  }
27 
29 
30  CVSymbolArray::Iterator begin() const { return Records.begin(); }
31  CVSymbolArray::Iterator end() const { return Records.end(); }
32 
33 private:
34  CVSymbolArray Records;
35 };
36 
38 public:
40  static bool classof(const DebugSubsection *S) {
41  return S->kind() == DebugSubsectionKind::Symbols;
42  }
43 
44  uint32_t calculateSerializedSize() const override;
45  Error commit(BinaryStreamWriter &Writer) const override;
46 
47  void addSymbol(CVSymbol Symbol);
48 
49 private:
50  uint32_t Length = 0;
51  std::vector<CVSymbol> Records;
52 };
53 }
54 }
55 
56 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Iterator end() const
Error initialize(BinaryStreamReader Reader)
static bool classof(const DebugSubsection *S)
static bool classof(const DebugSubsectionRef *S)
Provides write only access to a subclass of WritableBinaryStream.
VarStreamArray represents an array of variable length records backed by a stream. ...
DebugSubsectionKind kind() const
Iterator begin(bool *HadError=nullptr) const
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158
Provides read only access to a subclass of BinaryStream.
DebugSubsectionKind kind() const