Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:21

0001 //==- CodeViewYAMLTypes.h - CodeView YAMLIO Type implementation --*- C++ -*-==//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file defines classes for handling the YAML representation of CodeView
0010 // Debug Info.
0011 //
0012 //===----------------------------------------------------------------------===//
0013 
0014 #ifndef LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
0015 #define LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
0016 
0017 #include "llvm/ADT/ArrayRef.h"
0018 #include "llvm/DebugInfo/CodeView/TypeRecord.h"
0019 #include "llvm/Support/Allocator.h"
0020 #include "llvm/Support/Error.h"
0021 #include "llvm/Support/YAMLTraits.h"
0022 #include <cstdint>
0023 #include <memory>
0024 #include <vector>
0025 
0026 namespace llvm {
0027 
0028 namespace codeview {
0029 class AppendingTypeTableBuilder;
0030 }
0031 
0032 namespace CodeViewYAML {
0033 
0034 namespace detail {
0035 
0036 struct LeafRecordBase;
0037 struct MemberRecordBase;
0038 
0039 } // end namespace detail
0040 
0041 struct MemberRecord {
0042   std::shared_ptr<detail::MemberRecordBase> Member;
0043 };
0044 
0045 struct LeafRecord {
0046   std::shared_ptr<detail::LeafRecordBase> Leaf;
0047 
0048   codeview::CVType
0049   toCodeViewRecord(codeview::AppendingTypeTableBuilder &Serializer) const;
0050   static Expected<LeafRecord> fromCodeViewRecord(codeview::CVType Type);
0051 };
0052 
0053 std::vector<LeafRecord> fromDebugT(ArrayRef<uint8_t> DebugTorP,
0054                                    StringRef SectionName);
0055 ArrayRef<uint8_t> toDebugT(ArrayRef<LeafRecord>, BumpPtrAllocator &Alloc,
0056                            StringRef SectionName);
0057 
0058 } // end namespace CodeViewYAML
0059 
0060 } // end namespace llvm
0061 
0062 LLVM_YAML_DECLARE_SCALAR_TRAITS(codeview::GUID, QuotingType::Single)
0063 
0064 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::LeafRecord)
0065 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::MemberRecord)
0066 
0067 LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::LeafRecord)
0068 LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::MemberRecord)
0069 
0070 #endif // LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H