LLVM  14.0.0git
DebugSymbolRVASubsection.cpp
Go to the documentation of this file.
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 //===----------------------------------------------------------------------===//
8 
10 #include "llvm/ADT/ArrayRef.h"
14 #include <cstdint>
15 
16 using namespace llvm;
17 using namespace llvm::codeview;
18 
21 
23  return Reader.readArray(RVAs, Reader.bytesRemaining() / sizeof(uint32_t));
24 }
25 
28 
30  return Writer.writeArray(makeArrayRef(RVAs));
31 }
32 
34  return RVAs.size() * sizeof(uint32_t);
35 }
llvm::codeview::DebugSymbolRVASubsection::commit
Error commit(BinaryStreamWriter &Writer) const override
Definition: DebugSymbolRVASubsection.cpp:29
BinaryStreamReader.h
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::codeview::DebugSymbolRVASubsectionRef::initialize
Error initialize(BinaryStreamReader &Reader)
Definition: DebugSymbolRVASubsection.cpp:22
llvm::codeview::DebugSubsectionKind::CoffSymbolRVA
@ CoffSymbolRVA
DebugSymbolRVASubsection.h
llvm::BinaryStreamWriter
Provides write only access to a subclass of WritableBinaryStream.
Definition: BinaryStreamWriter.h:31
llvm::BinaryStreamReader::bytesRemaining
uint64_t bytesRemaining() const
Definition: BinaryStreamReader.h:257
llvm::BinaryStreamWriter::writeArray
Error writeArray(ArrayRef< T > Array)
Writes an array of objects of type T to the underlying stream, as if by using memcpy.
Definition: BinaryStreamWriter.h:151
llvm::codeview::DebugSubsectionRef
Definition: DebugSubsection.h:19
CodeView.h
llvm::BinaryStreamReader
Provides read only access to a subclass of BinaryStream.
Definition: BinaryStreamReader.h:31
ArrayRef.h
uint32_t
llvm::codeview::DebugSymbolRVASubsection::calculateSerializedSize
uint32_t calculateSerializedSize() const override
Definition: DebugSymbolRVASubsection.cpp:33
llvm::codeview::DebugSubsection
Definition: DebugSubsection.h:32
llvm::codeview::DebugSymbolRVASubsection::DebugSymbolRVASubsection
DebugSymbolRVASubsection()
Definition: DebugSymbolRVASubsection.cpp:26
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::codeview::DebugSymbolRVASubsectionRef::DebugSymbolRVASubsectionRef
DebugSymbolRVASubsectionRef()
Definition: DebugSymbolRVASubsection.cpp:19
llvm::codeview::DebugSubsectionKind
DebugSubsectionKind
Definition: CodeView.h:313
llvm::codeview
Definition: AppendingTypeTableBuilder.h:22
llvm::makeArrayRef
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
Definition: ArrayRef.h:474
BinaryStreamWriter.h
llvm::BinaryStreamReader::readArray
Error readArray(ArrayRef< T > &Array, uint32_t NumElements)
Get a reference to a NumElements element array of objects of type T from the underlying stream as if ...
Definition: BinaryStreamReader.h:187