LLVM  10.0.0svn
DebugSymbolsSubsection.h
Go to the documentation of this file.
1 //===- DebugSymbolsSubsection.h --------------------------------*- 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_CODEVIEW_DEBUGSYMBOLSSUBSECTION_H
10 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLSSUBSECTION_H
11 
14 #include "llvm/Support/Error.h"
15 
16 namespace llvm {
17 namespace codeview {
19 public:
22 
23  static bool classof(const DebugSubsectionRef *S) {
24  return S->kind() == DebugSubsectionKind::Symbols;
25  }
26 
28 
29  CVSymbolArray::Iterator begin() const { return Records.begin(); }
30  CVSymbolArray::Iterator end() const { return Records.end(); }
31 
32 private:
33  CVSymbolArray Records;
34 };
35 
37 public:
39  static bool classof(const DebugSubsection *S) {
40  return S->kind() == DebugSubsectionKind::Symbols;
41  }
42 
43  uint32_t calculateSerializedSize() const override;
44  Error commit(BinaryStreamWriter &Writer) const override;
45 
46  void addSymbol(CVSymbol Symbol);
47 
48 private:
49  uint32_t Length = 0;
50  std::vector<CVSymbol> Records;
51 };
52 }
53 }
54 
55 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
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:157
Provides read only access to a subclass of BinaryStream.
DebugSubsectionKind kind() const
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Definition: CVRecord.h:30