LLVM  10.0.0svn
CodeViewYAMLSymbols.h
Go to the documentation of this file.
1 //===- CodeViewYAMLSymbols.h - CodeView YAMLIO Symbol implementation ------===//
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 // This file defines classes for handling the YAML representation of CodeView
10 // Debug Info.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_OBJECTYAML_CODEVIEWYAMLSYMBOLS_H
15 #define LLVM_OBJECTYAML_CODEVIEWYAMLSYMBOLS_H
16 
19 #include "llvm/Support/Error.h"
21 #include <memory>
22 
23 namespace llvm {
24 namespace CodeViewYAML {
25 
26 namespace detail {
27 
28 struct SymbolRecordBase;
29 
30 } // end namespace detail
31 
32 struct SymbolRecord {
33  std::shared_ptr<detail::SymbolRecordBase> Symbol;
34 
36  toCodeViewSymbol(BumpPtrAllocator &Allocator,
37  codeview::CodeViewContainer Container) const;
38 
39  static Expected<SymbolRecord> fromCodeViewSymbol(codeview::CVSymbol Symbol);
40 };
41 
42 } // end namespace CodeViewYAML
43 } // end namespace llvm
44 
45 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SymbolRecord)
46 LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::SymbolRecord)
47 
48 #endif // LLVM_OBJECTYAML_CODEVIEWYAMLSYMBOLS_H
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Tagged union holding either a T or a Error.
Definition: yaml2obj.h:21
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
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Definition: CVRecord.h:30