Path: blob/main/contrib/llvm-project/llvm/lib/DebugInfo/CodeView/DebugSymbolRVASubsection.cpp
35271 views
//===- DebugSymbolRVASubsection.cpp ---------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "llvm/DebugInfo/CodeView/DebugSymbolRVASubsection.h"9#include "llvm/ADT/ArrayRef.h"10#include "llvm/DebugInfo/CodeView/CodeView.h"11#include "llvm/Support/BinaryStreamReader.h"12#include "llvm/Support/BinaryStreamWriter.h"13#include <cstdint>1415using namespace llvm;16using namespace llvm::codeview;1718DebugSymbolRVASubsectionRef::DebugSymbolRVASubsectionRef()19: DebugSubsectionRef(DebugSubsectionKind::CoffSymbolRVA) {}2021Error DebugSymbolRVASubsectionRef::initialize(BinaryStreamReader &Reader) {22return Reader.readArray(RVAs, Reader.bytesRemaining() / sizeof(uint32_t));23}2425DebugSymbolRVASubsection::DebugSymbolRVASubsection()26: DebugSubsection(DebugSubsectionKind::CoffSymbolRVA) {}2728Error DebugSymbolRVASubsection::commit(BinaryStreamWriter &Writer) const {29return Writer.writeArray(ArrayRef(RVAs));30}3132uint32_t DebugSymbolRVASubsection::calculateSerializedSize() const {33return RVAs.size() * sizeof(uint32_t);34}353637