LLVM
10.0.0
include
llvm
DebugInfo
CodeView
SimpleTypeSerializer.h
Go to the documentation of this file.
1
//===- SimpleTypeSerializer.h -----------------------------------*- 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
9
#ifndef LLVM_DEBUGINFO_CODEVIEW_SIMPLETYPESERIALIZER_H
10
#define LLVM_DEBUGINFO_CODEVIEW_SIMPLETYPESERIALIZER_H
11
12
#include "
llvm/ADT/ArrayRef.h
"
13
#include "
llvm/ADT/Optional.h
"
14
#include "
llvm/ADT/SmallVector.h
"
15
#include "
llvm/DebugInfo/CodeView/CodeView.h
"
16
#include "
llvm/DebugInfo/CodeView/RecordSerialization.h
"
17
#include "
llvm/DebugInfo/CodeView/TypeIndex.h
"
18
#include "
llvm/DebugInfo/CodeView/TypeRecord.h
"
19
#include "
llvm/DebugInfo/CodeView/TypeRecordMapping.h
"
20
#include "
llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h
"
21
#include "
llvm/Support/Allocator.h
"
22
#include "
llvm/Support/BinaryByteStream.h
"
23
#include "
llvm/Support/BinaryStreamWriter.h
"
24
#include "
llvm/Support/Error.h
"
25
#include <cassert>
26
#include <cstdint>
27
#include <memory>
28
#include <vector>
29
30
namespace
llvm
{
31
namespace
codeview {
32
33
class
SimpleTypeSerializer
{
34
std::vector<uint8_t> ScratchBuffer;
35
36
public
:
37
SimpleTypeSerializer
();
38
~SimpleTypeSerializer
();
39
40
// This template is explicitly instantiated in the implementation file for all
41
// supported types. The method itself is ugly, so inlining it into the header
42
// file clutters an otherwise straightforward interface.
43
template
<
typename
T>
ArrayRef<uint8_t>
serialize
(
T
&
Record
);
44
45
// Don't allow serialization of field list records using this interface.
46
ArrayRef<uint8_t>
serialize
(
const
FieldListRecord
&Record) =
delete
;
47
};
48
49
}
// end namespace codeview
50
}
// end namespace llvm
51
52
#endif // LLVM_DEBUGINFO_CODEVIEW_SIMPLETYPESERIALIZER_H
RecordSerialization.h
TypeVisitorCallbacks.h
llvm
This class represents lattice values for constants.
Definition:
AllocatorList.h:23
llvm::codeview::SimpleTypeSerializer
Definition:
SimpleTypeSerializer.h:33
CodeView.h
llvm::Record
Definition:
Record.h:1427
Allocator.h
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
llvm::codeview::FieldListRecord
Definition:
TypeRecord.h:390
llvm::ArrayRef< uint8_t >
TypeRecordMapping.h
llvm::codeview::SimpleTypeSerializer::SimpleTypeSerializer
SimpleTypeSerializer()
Definition:
SimpleTypeSerializer.cpp:19
Error.h
BinaryStreamWriter.h
llvm::codeview::SimpleTypeSerializer::serialize
ArrayRef< uint8_t > serialize(T &Record)
Definition:
SimpleTypeSerializer.cpp:24
BinaryByteStream.h
ArrayRef.h
T
llvm::codeview::SimpleTypeSerializer::~SimpleTypeSerializer
~SimpleTypeSerializer()
Definition:
SimpleTypeSerializer.cpp:21
TypeRecord.h
SmallVector.h
TypeIndex.h
Optional.h
Generated on Tue Mar 24 2020 13:08:00 for LLVM by
1.8.13