Line data Source code
1 : //===- DebugSymbolRVASubsection.cpp ---------------------------------------===//
2 : //
3 : // The LLVM Compiler Infrastructure
4 : //
5 : // This file is distributed under the University of Illinois Open Source
6 : // License. See LICENSE.TXT for details.
7 : //
8 : //===----------------------------------------------------------------------===//
9 :
10 : #include "llvm/DebugInfo/CodeView/DebugSymbolRVASubsection.h"
11 : #include "llvm/ADT/ArrayRef.h"
12 : #include "llvm/DebugInfo/CodeView/CodeView.h"
13 : #include "llvm/Support/BinaryStreamReader.h"
14 : #include "llvm/Support/BinaryStreamWriter.h"
15 : #include <cstdint>
16 :
17 : using namespace llvm;
18 : using namespace llvm::codeview;
19 :
20 0 : DebugSymbolRVASubsectionRef::DebugSymbolRVASubsectionRef()
21 0 : : DebugSubsectionRef(DebugSubsectionKind::CoffSymbolRVA) {}
22 :
23 0 : Error DebugSymbolRVASubsectionRef::initialize(BinaryStreamReader &Reader) {
24 0 : return Reader.readArray(RVAs, Reader.bytesRemaining() / sizeof(uint32_t));
25 : }
26 :
27 0 : DebugSymbolRVASubsection::DebugSymbolRVASubsection()
28 0 : : DebugSubsection(DebugSubsectionKind::CoffSymbolRVA) {}
29 :
30 0 : Error DebugSymbolRVASubsection::commit(BinaryStreamWriter &Writer) const {
31 0 : return Writer.writeArray(makeArrayRef(RVAs));
32 : }
33 :
34 0 : uint32_t DebugSymbolRVASubsection::calculateSerializedSize() const {
35 0 : return RVAs.size() * sizeof(uint32_t);
36 : }
|