File indexing completed on 2026-05-10 08:43:39
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLRVASUBSECTION_H
0010 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGSYMBOLRVASUBSECTION_H
0011
0012 #include "llvm/DebugInfo/CodeView/CodeView.h"
0013 #include "llvm/DebugInfo/CodeView/DebugSubsection.h"
0014 #include "llvm/Support/BinaryStreamArray.h"
0015 #include "llvm/Support/Endian.h"
0016 #include "llvm/Support/Error.h"
0017 #include <cstdint>
0018 #include <vector>
0019
0020 namespace llvm {
0021
0022 class BinaryStreamReader;
0023
0024 namespace codeview {
0025
0026 class DebugSymbolRVASubsectionRef final : public DebugSubsectionRef {
0027 public:
0028 using ArrayType = FixedStreamArray<support::ulittle32_t>;
0029
0030 DebugSymbolRVASubsectionRef();
0031
0032 static bool classof(const DebugSubsectionRef *S) {
0033 return S->kind() == DebugSubsectionKind::CoffSymbolRVA;
0034 }
0035
0036 ArrayType::Iterator begin() const { return RVAs.begin(); }
0037 ArrayType::Iterator end() const { return RVAs.end(); }
0038
0039 Error initialize(BinaryStreamReader &Reader);
0040
0041 private:
0042 ArrayType RVAs;
0043 };
0044
0045 class DebugSymbolRVASubsection final : public DebugSubsection {
0046 public:
0047 DebugSymbolRVASubsection();
0048
0049 static bool classof(const DebugSubsection *S) {
0050 return S->kind() == DebugSubsectionKind::CoffSymbolRVA;
0051 }
0052
0053 Error commit(BinaryStreamWriter &Writer) const override;
0054 uint32_t calculateSerializedSize() const override;
0055
0056 void addRVA(uint32_t RVA) { RVAs.push_back(support::ulittle32_t(RVA)); }
0057
0058 private:
0059 std::vector<support::ulittle32_t> RVAs;
0060 };
0061
0062 }
0063
0064 }
0065
0066 #endif