1 //===- DebugSymbolRVASubsection.h -------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLRVASUBSECTION_H
11 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLRVASUBSECTION_H
13 #include "llvm/DebugInfo/CodeView/CodeView.h"
14 #include "llvm/DebugInfo/CodeView/DebugSubsection.h"
15 #include "llvm/Support/BinaryStreamArray.h"
16 #include "llvm/Support/Endian.h"
17 #include "llvm/Support/Error.h"
23 class BinaryStreamReader;
27 class DebugSymbolRVASubsectionRef final : public DebugSubsectionRef {
29 using ArrayType = FixedStreamArray<support::ulittle32_t>;
31 DebugSymbolRVASubsectionRef();
33 static bool classof(const DebugSubsectionRef *S) {
34 return S->kind() == DebugSubsectionKind::CoffSymbolRVA;
37 ArrayType::Iterator begin() const { return RVAs.begin(); }
38 ArrayType::Iterator end() const { return RVAs.end(); }
40 Error initialize(BinaryStreamReader &Reader);
46 class DebugSymbolRVASubsection final : public DebugSubsection {
48 DebugSymbolRVASubsection();
50 static bool classof(const DebugSubsection *S) {
51 return S->kind() == DebugSubsectionKind::CoffSymbolRVA;
54 Error commit(BinaryStreamWriter &Writer) const override;
55 uint32_t calculateSerializedSize() const override;
57 void addRVA(uint32_t RVA) { RVAs.push_back(support::ulittle32_t(RVA)); }
60 std::vector<support::ulittle32_t> RVAs;
63 } // end namespace codeview
65 } // end namespace llvm
67 #endif // LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLRVASUBSECTION_H