[ARM] Split large truncating MVE stores
[llvm-complete.git] / lib / DebugInfo / CodeView / DebugSymbolRVASubsection.cpp
blob52328967357b02801f11c3339f79aec0bef524ce
1 //===- DebugSymbolRVASubsection.cpp ---------------------------------------===//
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 //===----------------------------------------------------------------------===//
9 #include "llvm/DebugInfo/CodeView/DebugSymbolRVASubsection.h"
10 #include "llvm/ADT/ArrayRef.h"
11 #include "llvm/DebugInfo/CodeView/CodeView.h"
12 #include "llvm/Support/BinaryStreamReader.h"
13 #include "llvm/Support/BinaryStreamWriter.h"
14 #include <cstdint>
16 using namespace llvm;
17 using namespace llvm::codeview;
19 DebugSymbolRVASubsectionRef::DebugSymbolRVASubsectionRef()
20 : DebugSubsectionRef(DebugSubsectionKind::CoffSymbolRVA) {}
22 Error DebugSymbolRVASubsectionRef::initialize(BinaryStreamReader &Reader) {
23 return Reader.readArray(RVAs, Reader.bytesRemaining() / sizeof(uint32_t));
26 DebugSymbolRVASubsection::DebugSymbolRVASubsection()
27 : DebugSubsection(DebugSubsectionKind::CoffSymbolRVA) {}
29 Error DebugSymbolRVASubsection::commit(BinaryStreamWriter &Writer) const {
30 return Writer.writeArray(makeArrayRef(RVAs));
33 uint32_t DebugSymbolRVASubsection::calculateSerializedSize() const {
34 return RVAs.size() * sizeof(uint32_t);