LLVM  10.0.0svn
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 }
This class represents lattice values for constants.
Definition: AllocatorList.h:23
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
Definition: ArrayRef.h:450
Error writeArray(ArrayRef< T > Array)
Writes an array of objects of type T to the underlying stream, as if by using memcpy.
Provides write only access to a subclass of WritableBinaryStream.
uint32_t bytesRemaining() const
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
Error commit(BinaryStreamWriter &Writer) const override
Provides read only access to a subclass of BinaryStream.
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 ...