LLVM  8.0.1
SimpleTypeSerializer.h
Go to the documentation of this file.
1 //===- SimpleTypeSerializer.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_SIMPLETYPESERIALIZER_H
11 #define LLVM_DEBUGINFO_CODEVIEW_SIMPLETYPESERIALIZER_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 {
33 
35  std::vector<uint8_t> ScratchBuffer;
36 
37 public:
40 
41  // This template is explicitly instantiated in the implementation file for all
42  // supported types. The method itself is ugly, so inlining it into the header
43  // file clutters an otherwise straightforward interface.
44  template <typename T> ArrayRef<uint8_t> serialize(T &Record);
45 
46  // Don't allow serialization of field list records using this interface.
47  ArrayRef<uint8_t> serialize(const FieldListRecord &Record) = delete;
48 };
49 
50 } // end namespace codeview
51 } // end namespace llvm
52 
53 #endif // LLVM_DEBUGINFO_CODEVIEW_SIMPLETYPESERIALIZER_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
ArrayRef< uint8_t > serialize(T &Record)