LLVM  10.0.0svn
DebugSymbolsSubsection.cpp
Go to the documentation of this file.
1 //===- DebugSymbolsSubsection.cpp -------------------------------*- C++ -*-===//
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 
11 using namespace llvm;
12 using namespace llvm::codeview;
13 
15  return Reader.readArray(Records, Reader.getLength());
16 }
17 
19  return Length;
20 }
21 
23  for (const auto &Record : Records) {
24  if (auto EC = Writer.writeBytes(Record.RecordData))
25  return EC;
26  }
27  return Error::success();
28 }
29 
31  Records.push_back(Symbol);
32  Length += Symbol.length();
33 }
Error writeBytes(ArrayRef< uint8_t > Buffer)
Write the bytes specified in Buffer to the underlying stream.
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Error initialize(BinaryStreamReader Reader)
uint32_t length() const
Definition: CVRecord.h:41
Provides write only access to a subclass of WritableBinaryStream.
static ErrorSuccess success()
Create a success value.
Definition: Error.h:326
Error commit(BinaryStreamWriter &Writer) const override
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
Provides read only access to a subclass of BinaryStream.
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Definition: CVRecord.h:30
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 ...