LLVM  14.0.0git
DebugSymbolRVASubsection.h
Go to the documentation of this file.
1 //===- DebugSymbolRVASubsection.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_DEBUGSYMBOLRVASUBSECTION_H
10 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLRVASUBSECTION_H
11 
15 #include "llvm/Support/Endian.h"
16 #include "llvm/Support/Error.h"
17 #include <cstdint>
18 #include <vector>
19 
20 namespace llvm {
21 
22 class BinaryStreamReader;
23 
24 namespace codeview {
25 
27 public:
29 
31 
32  static bool classof(const DebugSubsectionRef *S) {
33  return S->kind() == DebugSubsectionKind::CoffSymbolRVA;
34  }
35 
36  ArrayType::Iterator begin() const { return RVAs.begin(); }
37  ArrayType::Iterator end() const { return RVAs.end(); }
38 
40 
41 private:
42  ArrayType RVAs;
43 };
44 
46 public:
48 
49  static bool classof(const DebugSubsection *S) {
50  return S->kind() == DebugSubsectionKind::CoffSymbolRVA;
51  }
52 
53  Error commit(BinaryStreamWriter &Writer) const override;
54  uint32_t calculateSerializedSize() const override;
55 
56  void addRVA(uint32_t RVA) { RVAs.push_back(support::ulittle32_t(RVA)); }
57 
58 private:
59  std::vector<support::ulittle32_t> RVAs;
60 };
61 
62 } // end namespace codeview
63 
64 } // end namespace llvm
65 
66 #endif // LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLRVASUBSECTION_H
llvm::codeview::DebugSymbolRVASubsection::commit
Error commit(BinaryStreamWriter &Writer) const override
Definition: DebugSymbolRVASubsection.cpp:29
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::codeview::DebugSymbolRVASubsectionRef::initialize
Error initialize(BinaryStreamReader &Reader)
Definition: DebugSymbolRVASubsection.cpp:22
llvm::codeview::DebugSubsectionKind::CoffSymbolRVA
@ CoffSymbolRVA
llvm::support::detail::packed_endian_specific_integral
Definition: Endian.h:206
llvm::BinaryStreamWriter
Provides write only access to a subclass of WritableBinaryStream.
Definition: BinaryStreamWriter.h:31
Error.h
llvm::ArrayType
Class to represent array types.
Definition: DerivedTypes.h:357
llvm::FixedStreamArray< support::ulittle32_t >
llvm::codeview::DebugSymbolRVASubsectionRef::end
ArrayType::Iterator end() const
Definition: DebugSymbolRVASubsection.h:37
llvm::codeview::DebugSymbolRVASubsectionRef
Definition: DebugSymbolRVASubsection.h:26
llvm::codeview::DebugSymbolRVASubsection
Definition: DebugSymbolRVASubsection.h:45
llvm::codeview::DebugSubsectionRef
Definition: DebugSubsection.h:19
llvm::FixedStreamArray::begin
FixedStreamArrayIterator< T > begin() const
Definition: BinaryStreamArray.h:302
llvm::codeview::DebugSymbolRVASubsectionRef::classof
static bool classof(const DebugSubsectionRef *S)
Definition: DebugSymbolRVASubsection.h:32
CodeView.h
llvm::BinaryStreamReader
Provides read only access to a subclass of BinaryStream.
Definition: BinaryStreamReader.h:31
llvm::codeview::DebugSymbolRVASubsection::addRVA
void addRVA(uint32_t RVA)
Definition: DebugSymbolRVASubsection.h:56
DebugSubsection.h
BinaryStreamArray.h
llvm::FixedStreamArray::end
FixedStreamArrayIterator< T > end() const
Definition: BinaryStreamArray.h:306
llvm::codeview::DebugSymbolRVASubsection::classof
static bool classof(const DebugSubsection *S)
Definition: DebugSymbolRVASubsection.h:49
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::DebugSymbolRVASubsection::calculateSerializedSize
uint32_t calculateSerializedSize() const override
Definition: DebugSymbolRVASubsection.cpp:33
llvm::codeview::DebugSubsection
Definition: DebugSubsection.h:32
llvm::codeview::DebugSymbolRVASubsection::DebugSymbolRVASubsection
DebugSymbolRVASubsection()
Definition: DebugSymbolRVASubsection.cpp:26
llvm::codeview::DebugSymbolRVASubsectionRef::begin
ArrayType::Iterator begin() const
Definition: DebugSymbolRVASubsection.h:36
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::codeview::DebugSymbolRVASubsectionRef::DebugSymbolRVASubsectionRef
DebugSymbolRVASubsectionRef()
Definition: DebugSymbolRVASubsection.cpp:19
Endian.h
llvm::FixedStreamArrayIterator
Definition: BinaryStreamArray.h:255