Path: blob/main/contrib/llvm-project/llvm/lib/DebugInfo/CodeView/DebugSymbolsSubsection.cpp
35271 views
//===- DebugSymbolsSubsection.cpp -------------------------------*- C++ -*-===//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/DebugSymbolsSubsection.h"9#include "llvm/Support/BinaryStreamWriter.h"1011using namespace llvm;12using namespace llvm::codeview;1314Error DebugSymbolsSubsectionRef::initialize(BinaryStreamReader Reader) {15return Reader.readArray(Records, Reader.getLength());16}1718uint32_t DebugSymbolsSubsection::calculateSerializedSize() const {19return Length;20}2122Error DebugSymbolsSubsection::commit(BinaryStreamWriter &Writer) const {23for (const auto &Record : Records) {24if (auto EC = Writer.writeBytes(Record.RecordData))25return EC;26}27return Error::success();28}2930void DebugSymbolsSubsection::addSymbol(CVSymbol Symbol) {31Records.push_back(Symbol);32Length += Symbol.length();33}343536