LLVM  8.0.0svn
CodeViewYAMLSymbols.h
Go to the documentation of this file.
1 //===- CodeViewYAMLSymbols.h - CodeView YAMLIO Symbol implementation ------===//
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_CODEVIEWYAMLSYMBOLS_H
16 #define LLVM_OBJECTYAML_CODEVIEWYAMLSYMBOLS_H
17 
20 #include "llvm/Support/Error.h"
22 #include <memory>
23 
24 namespace llvm {
25 namespace CodeViewYAML {
26 
27 namespace detail {
28 
29 struct SymbolRecordBase;
30 
31 } // end namespace detail
32 
33 struct SymbolRecord {
34  std::shared_ptr<detail::SymbolRecordBase> Symbol;
35 
37  toCodeViewSymbol(BumpPtrAllocator &Allocator,
38  codeview::CodeViewContainer Container) const;
39 
40  static Expected<SymbolRecord> fromCodeViewSymbol(codeview::CVSymbol Symbol);
41 };
42 
43 } // end namespace CodeViewYAML
44 } // end namespace llvm
45 
46 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SymbolRecord)
47 LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::SymbolRecord)
48 
49 #endif // LLVM_OBJECTYAML_CODEVIEWYAMLSYMBOLS_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:141
Basic Register Allocator
std::shared_ptr< detail::SymbolRecordBase > Symbol