LLVM  8.0.1
DebugSymbolsSubsection.cpp
Go to the documentation of this file.
1 //===- DebugSymbolsSubsection.cpp -------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
11 
12 using namespace llvm;
13 using namespace llvm::codeview;
14 
16  return Reader.readArray(Records, Reader.getLength());
17 }
18 
20  return Length;
21 }
22 
24  for (const auto &Record : Records) {
25  if (auto EC = Writer.writeBytes(Record.RecordData))
26  return EC;
27  }
28  return Error::success();
29 }
30 
32  Records.push_back(Symbol);
33  Length += Symbol.length();
34 }
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:24
Error initialize(BinaryStreamReader Reader)
uint32_t length() const
Definition: CVRecord.h:36
Provides write only access to a subclass of WritableBinaryStream.
static ErrorSuccess success()
Create a success value.
Definition: Error.h:327
Error commit(BinaryStreamWriter &Writer) const override
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158
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 ...