LLVM  14.0.0git
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 
47 
48 private:
49  uint32_t Length = 0;
50  std::vector<CVSymbol> Records;
51 };
52 }
53 }
54 
55 #endif
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::codeview::DebugSymbolsSubsection::DebugSymbolsSubsection
DebugSymbolsSubsection()
Definition: DebugSymbolsSubsection.h:38
llvm::codeview::DebugSymbolsSubsection::classof
static bool classof(const DebugSubsection *S)
Definition: DebugSymbolsSubsection.h:39
llvm::BinaryStreamWriter
Provides write only access to a subclass of WritableBinaryStream.
Definition: BinaryStreamWriter.h:31
llvm::codeview::DebugSymbolsSubsectionRef::begin
CVSymbolArray::Iterator begin() const
Definition: DebugSymbolsSubsection.h:29
Error.h
llvm::codeview::DebugSymbolsSubsectionRef::end
CVSymbolArray::Iterator end() const
Definition: DebugSymbolsSubsection.h:30
llvm::codeview::DebugSymbolsSubsection::commit
Error commit(BinaryStreamWriter &Writer) const override
Definition: DebugSymbolsSubsection.cpp:22
llvm::VarStreamArray::end
Iterator end() const
Definition: BinaryStreamArray.h:115
llvm::codeview::DebugSymbolsSubsection
Definition: DebugSymbolsSubsection.h:36
llvm::VarStreamArray< CVSymbol >
llvm::codeview::DebugSubsectionRef
Definition: DebugSubsection.h:19
llvm::codeview::DebugSymbolsSubsection::addSymbol
void addSymbol(CVSymbol Symbol)
Definition: DebugSymbolsSubsection.cpp:30
llvm::BinaryStreamReader
Provides read only access to a subclass of BinaryStream.
Definition: BinaryStreamReader.h:31
DebugSubsection.h
llvm::VarStreamArrayIterator
VarStreamArray represents an array of variable length records backed by a stream.
Definition: BinaryStreamArray.h:88
llvm::codeview::CVRecord
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Definition: CVRecord.h:30
uint32_t
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::codeview::DebugSymbolsSubsectionRef::classof
static bool classof(const DebugSubsectionRef *S)
Definition: DebugSymbolsSubsection.h:23
llvm::VarStreamArray::begin
Iterator begin(bool *HadError=nullptr) const
Definition: BinaryStreamArray.h:108
llvm::codeview::DebugSubsectionKind::Symbols
@ Symbols
llvm::codeview::DebugSubsection
Definition: DebugSubsection.h:32
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
CVRecord.h
llvm::codeview::DebugSubsectionKind
DebugSubsectionKind
Definition: CodeView.h:313
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:79
llvm::codeview::DebugSymbolsSubsectionRef::initialize
Error initialize(BinaryStreamReader Reader)
Definition: DebugSymbolsSubsection.cpp:14
llvm::codeview::DebugSymbolsSubsection::calculateSerializedSize
uint32_t calculateSerializedSize() const override
Definition: DebugSymbolsSubsection.cpp:18
llvm::codeview::DebugSymbolsSubsectionRef
Definition: DebugSymbolsSubsection.h:18
llvm::codeview::DebugSymbolsSubsectionRef::DebugSymbolsSubsectionRef
DebugSymbolsSubsectionRef()
Definition: DebugSymbolsSubsection.h:20