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 18 #include "llvm/DebugInfo/CodeView/CodeView.h" 19 #include "llvm/DebugInfo/CodeView/SymbolRecord.h" 20 #include "llvm/ObjectYAML/YAML.h" 21 22 namespace llvm { 23 namespace CodeViewYAML { 24 namespace detail { 25 struct SymbolRecordBase; 26 } 27 28 struct SymbolRecord { 29 std::shared_ptr<detail::SymbolRecordBase> Symbol; 30 31 codeview::CVSymbol 32 toCodeViewSymbol(BumpPtrAllocator &Allocator, 33 codeview::CodeViewContainer Container) const; 34 static Expected<SymbolRecord> fromCodeViewSymbol(codeview::CVSymbol Symbol); 35 }; 36 37 } // namespace CodeViewYAML 38 } // namespace llvm 39 40 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SymbolRecord) 41 LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::SymbolRecord) 42 43 #endif 44