1 //===- DebugSymbolRVASubsection.cpp ------------------------------*- 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 #include "llvm/DebugInfo/CodeView/DebugSymbolRVASubsection.h"
13 using namespace llvm::codeview;
15 DebugSymbolRVASubsectionRef::DebugSymbolRVASubsectionRef()
16 : DebugSubsectionRef(DebugSubsectionKind::CoffSymbolRVA) {}
18 Error DebugSymbolRVASubsectionRef::initialize(BinaryStreamReader &Reader) {
19 return Reader.readArray(RVAs, Reader.bytesRemaining() / sizeof(uint32_t));
22 DebugSymbolRVASubsection::DebugSymbolRVASubsection()
23 : DebugSubsection(DebugSubsectionKind::CoffSymbolRVA) {}
25 Error DebugSymbolRVASubsection::commit(BinaryStreamWriter &Writer) const {
26 return Writer.writeArray(makeArrayRef(RVAs));
29 uint32_t DebugSymbolRVASubsection::calculateSerializedSize() const {
30 return RVAs.size() * sizeof(uint32_t);