LLVM  8.0.1
ContinuationRecordBuilder.h
Go to the documentation of this file.
1 //===- ContinuationRecordBuilder.h ------------------------------*- 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 
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_CONTINUATIONRECORDBUILDER_H
11 #define LLVM_DEBUGINFO_CODEVIEW_CONTINUATIONRECORDBUILDER_H
12 
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/ADT/Optional.h"
15 #include "llvm/ADT/SmallVector.h"
22 #include "llvm/Support/Allocator.h"
25 #include "llvm/Support/Error.h"
26 #include <cassert>
27 #include <cstdint>
28 #include <memory>
29 #include <vector>
30 
31 namespace llvm {
32 namespace codeview {
34 
36  SmallVector<uint32_t, 4> SegmentOffsets;
39  BinaryStreamWriter SegmentWriter;
40  TypeRecordMapping Mapping;
41  ArrayRef<uint8_t> InjectedSegmentBytes;
42 
43  uint32_t getCurrentSegmentLength() const;
44 
45  void insertSegmentEnd(uint32_t Offset);
46  CVType createSegmentRecord(uint32_t OffBegin, uint32_t OffEnd,
47  Optional<TypeIndex> RefersTo);
48 
49 public:
52 
53  void begin(ContinuationRecordKind RecordKind);
54 
55  // This template is explicitly instantiated in the implementation file for all
56  // supported types. The method itself is ugly, so inlining it into the header
57  // file clutters an otherwise straightforward interface.
58  template <typename RecordType> void writeMemberType(RecordType &Record);
59 
60  std::vector<CVType> end(TypeIndex Index);
61 };
62 } // namespace codeview
63 } // namespace llvm
64 
65 #endif
const_iterator end(StringRef path)
Get end iterator over path.
Definition: Path.cpp:259
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
Definition: Path.cpp:250
This class represents lattice values for constants.
Definition: AllocatorList.h:24
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
A 32-bit type reference.
Definition: TypeIndex.h:96
Provides write only access to a subclass of WritableBinaryStream.
An implementation of WritableBinaryStream which can write at its end causing the underlying data to g...
const unsigned Kind