LLVM  6.0.0svn
CodeViewYAMLTypes.h
Go to the documentation of this file.
1 //==- CodeViewYAMLTypes.h - CodeView YAMLIO Type implementation --*- 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 // This file defines classes for handling the YAML representation of CodeView
11 // Debug Info.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
16 #define LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
17 
18 #include "llvm/ADT/ArrayRef.h"
20 #include "llvm/Support/Allocator.h"
21 #include "llvm/Support/Error.h"
23 #include <cstdint>
24 #include <memory>
25 #include <vector>
26 
27 namespace llvm {
28 
29 namespace codeview {
30 
31 class TypeTableBuilder;
32 
33 } // end namespace codeview
34 
35 namespace CodeViewYAML {
36 
37 namespace detail {
38 
39 struct LeafRecordBase;
40 struct MemberRecordBase;
41 
42 } // end namespace detail
43 
44 struct MemberRecord {
45  std::shared_ptr<detail::MemberRecordBase> Member;
46 };
47 
48 struct LeafRecord {
49  std::shared_ptr<detail::LeafRecordBase> Leaf;
50 
51  codeview::CVType toCodeViewRecord(BumpPtrAllocator &Allocator) const;
52  codeview::CVType toCodeViewRecord(codeview::TypeTableBuilder &TS) const;
53  static Expected<LeafRecord> fromCodeViewRecord(codeview::CVType Type);
54 };
55 
56 std::vector<LeafRecord> fromDebugT(ArrayRef<uint8_t> DebugT);
58 
59 } // end namespace CodeViewYAML
60 
61 } // end namespace llvm
62 
64 
67 
70 
71 #endif // LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
Utility for declaring that a std::vector of a particular type should be considered a YAML sequence...
Definition: YAMLTraits.h:1643
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
ArrayRef< uint8_t > toDebugT(ArrayRef< LeafRecord >, BumpPtrAllocator &Alloc)
This represents the &#39;GUID&#39; type from windows.h.
Definition: GUID.h:22
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
std::vector< LeafRecord > fromDebugT(ArrayRef< uint8_t > DebugT)
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:46
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:138
Basic Register Allocator
#define LLVM_YAML_DECLARE_SCALAR_TRAITS(Type, MustQuote)
Definition: YAMLTraits.h:1678
std::shared_ptr< detail::MemberRecordBase > Member
#define LLVM_YAML_DECLARE_MAPPING_TRAITS(Type)
Definition: YAMLTraits.h:1651
std::shared_ptr< detail::LeafRecordBase > Leaf