LLVM  14.0.0git
CodeViewYAMLDebugSections.h
Go to the documentation of this file.
1 //=- CodeViewYAMLDebugSections.h - CodeView YAMLIO debug sections -*- C++ -*-=//
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_CODEVIEWYAMLDEBUGSECTIONS_H
15 #define LLVM_OBJECTYAML_CODEVIEWYAMLDEBUGSECTIONS_H
16 
17 #include "llvm/ADT/ArrayRef.h"
18 #include "llvm/ADT/StringRef.h"
22 #include "llvm/Support/Error.h"
24 #include <cstdint>
25 #include <memory>
26 #include <vector>
27 
28 namespace llvm {
29 
30 namespace codeview {
31 
32 class StringsAndChecksums;
33 class StringsAndChecksumsRef;
34 
35 } // end namespace codeview
36 
37 namespace CodeViewYAML {
38 
39 namespace detail {
40 
41 struct YAMLSubsectionBase;
42 
43 } // end namespace detail
44 
45 struct YAMLFrameData {
55 };
56 
59  std::vector<uint32_t> ImportIds;
60 };
61 
67 };
68 
72 };
73 
76  std::vector<SourceLineEntry> Lines;
77  std::vector<SourceColumnEntry> Columns;
78 };
79 
81  std::vector<uint8_t> Bytes;
82 };
83 
88 };
89 
95  std::vector<SourceLineBlock> Blocks;
96 };
97 
98 struct InlineeSite {
102  std::vector<StringRef> ExtraFiles;
103 };
104 
105 struct InlineeInfo {
107  std::vector<InlineeSite> Sites;
108 };
109 
114 
115  std::shared_ptr<detail::YAMLSubsectionBase> Subsection;
116 };
117 
119 
122  ArrayRef<YAMLDebugSubsection> Subsections,
124 
125 std::vector<YAMLDebugSubsection>
127 
130 
131 } // end namespace CodeViewYAML
132 
133 } // end namespace llvm
134 
135 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::YAMLDebugSubsection)
136 
137 LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::YAMLDebugSubsection)
138 
139 #endif // LLVM_OBJECTYAML_CODEVIEWYAMLDEBUGSECTIONS_H
LLVM_YAML_DECLARE_MAPPING_TRAITS
#define LLVM_YAML_DECLARE_MAPPING_TRAITS(Type)
llvm::CodeViewYAML::YAMLCrossModuleImport::ModuleName
StringRef ModuleName
Definition: CodeViewYAMLDebugSections.h:58
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::CodeViewYAML::SourceLineInfo::CodeSize
uint32_t CodeSize
Definition: CodeViewYAMLDebugSections.h:94
llvm::CodeViewYAML::InlineeSite
Definition: CodeViewYAMLDebugSections.h:98
llvm::CodeViewYAML::YAMLCrossModuleImport::ImportIds
std::vector< uint32_t > ImportIds
Definition: CodeViewYAMLDebugSections.h:59
llvm::CodeViewYAML::YAMLDebugSubsection
Definition: CodeViewYAMLDebugSections.h:110
StringRef.h
llvm::CodeViewYAML::SourceLineInfo::RelocOffset
uint32_t RelocOffset
Definition: CodeViewYAMLDebugSections.h:91
llvm::codeview::StringsAndChecksums
Definition: StringsAndChecksums.h:81
llvm::codeview::FileChecksumKind
FileChecksumKind
Definition: CodeView.h:564
llvm::CodeViewYAML::SourceLineInfo
Definition: CodeViewYAMLDebugSections.h:90
Error.h
LLVM_YAML_IS_SEQUENCE_VECTOR
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
llvm::CodeViewYAML::YAMLDebugSubsection::Subsection
std::shared_ptr< detail::YAMLSubsectionBase > Subsection
Definition: CodeViewYAMLDebugSections.h:115
llvm::CodeViewYAML::YAMLFrameData::LocalSize
uint32_t LocalSize
Definition: CodeViewYAMLDebugSections.h:48
llvm::CodeViewYAML::InlineeSite::Inlinee
uint32_t Inlinee
Definition: CodeViewYAMLDebugSections.h:99
llvm::CodeViewYAML::SourceLineBlock
Definition: CodeViewYAMLDebugSections.h:74
llvm::CodeViewYAML::SourceColumnEntry::StartColumn
uint16_t StartColumn
Definition: CodeViewYAMLDebugSections.h:70
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:42
llvm::CodeViewYAML::YAMLDebugSubsection::fromCodeViewSubection
static Expected< YAMLDebugSubsection > fromCodeViewSubection(const codeview::StringsAndChecksumsRef &SC, const codeview::DebugSubsectionRecord &SS)
Definition: CodeViewYAMLDebugSections.cpp:891
llvm::CodeViewYAML::YAMLFrameData::FrameFunc
StringRef FrameFunc
Definition: CodeViewYAMLDebugSections.h:51
llvm::CodeViewYAML::SourceLineEntry::IsStatement
bool IsStatement
Definition: CodeViewYAMLDebugSections.h:66
llvm::codeview::StringsAndChecksumsRef
Definition: StringsAndChecksums.h:21
llvm::CodeViewYAML::SourceLineBlock::FileName
StringRef FileName
Definition: CodeViewYAMLDebugSections.h:75
llvm::PPCISD::SC
@ SC
CHAIN = SC CHAIN, Imm128 - System call.
Definition: PPCISelLowering.h:418
DebugSubsectionRecord.h
llvm::CodeViewYAML::YAMLFrameData::SavedRegsSize
uint32_t SavedRegsSize
Definition: CodeViewYAMLDebugSections.h:53
llvm::CodeViewYAML::YAMLFrameData::Flags
uint32_t Flags
Definition: CodeViewYAMLDebugSections.h:54
llvm::CodeViewYAML::SourceLineEntry::EndDelta
uint32_t EndDelta
Definition: CodeViewYAMLDebugSections.h:65
llvm::CodeViewYAML::InlineeSite::SourceLineNum
uint32_t SourceLineNum
Definition: CodeViewYAMLDebugSections.h:101
llvm::CodeViewYAML::YAMLFrameData
Definition: CodeViewYAMLDebugSections.h:45
llvm::CodeViewYAML::YAMLCrossModuleImport
Definition: CodeViewYAMLDebugSections.h:57
CodeView.h
llvm::CodeViewYAML::SourceLineEntry
Definition: CodeViewYAMLDebugSections.h:62
DebugSubsection.h
llvm::CodeViewYAML::toCodeViewSubsectionList
Expected< std::vector< std::shared_ptr< codeview::DebugSubsection > > > toCodeViewSubsectionList(BumpPtrAllocator &Allocator, ArrayRef< YAMLDebugSubsection > Subsections, const codeview::StringsAndChecksums &SC)
Definition: CodeViewYAMLDebugSections.cpp:747
llvm::CodeViewYAML::SourceFileChecksumEntry::ChecksumBytes
HexFormattedString ChecksumBytes
Definition: CodeViewYAMLDebugSections.h:87
llvm::CodeViewYAML::detail::YAMLSubsectionBase
Definition: CodeViewYAMLDebugSections.cpp:87
llvm::CodeViewYAML::initializeStringsAndChecksums
void initializeStringsAndChecksums(ArrayRef< YAMLDebugSubsection > Sections, codeview::StringsAndChecksums &SC)
Definition: CodeViewYAMLDebugSections.cpp:922
llvm::BumpPtrAllocatorImpl
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:67
llvm::CodeViewYAML::HexFormattedString
Definition: CodeViewYAMLDebugSections.h:80
llvm::CodeViewYAML::SourceLineBlock::Lines
std::vector< SourceLineEntry > Lines
Definition: CodeViewYAMLDebugSections.h:76
ArrayRef.h
llvm::X86AS::SS
@ SS
Definition: X86.h:189
llvm::CodeViewYAML::HexFormattedString::Bytes
std::vector< uint8_t > Bytes
Definition: CodeViewYAMLDebugSections.h:81
llvm::codeview::DebugSubsectionRecord
Definition: DebugSubsectionRecord.h:35
YAMLTraits.h
llvm::CodeViewYAML::InlineeInfo::Sites
std::vector< InlineeSite > Sites
Definition: CodeViewYAMLDebugSections.h:107
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:57
uint32_t
llvm::CodeViewYAML::SourceColumnEntry
Definition: CodeViewYAMLDebugSections.h:69
llvm::CodeViewYAML::InlineeSite::ExtraFiles
std::vector< StringRef > ExtraFiles
Definition: CodeViewYAMLDebugSections.h:102
llvm::CodeViewYAML::YAMLFrameData::CodeSize
uint32_t CodeSize
Definition: CodeViewYAMLDebugSections.h:47
llvm::CodeViewYAML::SourceFileChecksumEntry::Kind
codeview::FileChecksumKind Kind
Definition: CodeViewYAMLDebugSections.h:86
llvm::CodeViewYAML::YAMLFrameData::MaxStackSize
uint32_t MaxStackSize
Definition: CodeViewYAMLDebugSections.h:50
llvm::CodeViewYAML::YAMLFrameData::RvaStart
uint32_t RvaStart
Definition: CodeViewYAMLDebugSections.h:46
llvm::CodeViewYAML::InlineeInfo::HasExtraFiles
bool HasExtraFiles
Definition: CodeViewYAMLDebugSections.h:106
llvm::CodeViewYAML::SourceColumnEntry::EndColumn
uint16_t EndColumn
Definition: CodeViewYAMLDebugSections.h:71
uint16_t
llvm::CodeViewYAML::SourceLineInfo::RelocSegment
uint32_t RelocSegment
Definition: CodeViewYAMLDebugSections.h:92
llvm::CodeViewYAML::YAMLFrameData::ParamsSize
uint32_t ParamsSize
Definition: CodeViewYAMLDebugSections.h:49
llvm::CodeViewYAML::SourceLineInfo::Flags
codeview::LineFlags Flags
Definition: CodeViewYAMLDebugSections.h:93
llvm::CodeViewYAML::fromDebugS
std::vector< YAMLDebugSubsection > fromDebugS(ArrayRef< uint8_t > Data, const codeview::StringsAndChecksumsRef &SC)
Definition: CodeViewYAMLDebugSections.cpp:901
llvm::CodeViewYAML::SourceLineEntry::LineStart
uint32_t LineStart
Definition: CodeViewYAMLDebugSections.h:64
llvm::CodeViewYAML::SourceLineEntry::Offset
uint32_t Offset
Definition: CodeViewYAMLDebugSections.h:63
llvm::CodeViewYAML::InlineeSite::FileName
StringRef FileName
Definition: CodeViewYAMLDebugSections.h:100
Allocator
Basic Register Allocator
Definition: RegAllocBasic.cpp:146
llvm::CodeViewYAML::SourceFileChecksumEntry
Definition: CodeViewYAMLDebugSections.h:84
llvm::CodeViewYAML::YAMLFrameData::PrologSize
uint32_t PrologSize
Definition: CodeViewYAMLDebugSections.h:52
llvm::codeview::LineFlags
LineFlags
Definition: CodeView.h:566
llvm::CodeViewYAML::DebugSubsectionState
Definition: CodeViewYAMLDebugSections.h:118
llvm::CodeViewYAML::InlineeInfo
Definition: CodeViewYAMLDebugSections.h:105
llvm::CodeViewYAML::SourceLineBlock::Columns
std::vector< SourceColumnEntry > Columns
Definition: CodeViewYAMLDebugSections.h:77
llvm::CodeViewYAML::SourceLineInfo::Blocks
std::vector< SourceLineBlock > Blocks
Definition: CodeViewYAMLDebugSections.h:95
llvm::CodeViewYAML::SourceFileChecksumEntry::FileName
StringRef FileName
Definition: CodeViewYAMLDebugSections.h:85