LLVM: lib/ObjectYAML/CodeViewYAMLDebugSections.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
43#include
44#include
45#include
46#include
47#include
48
49using namespace llvm;
54
65
70
80
81namespace llvm {
84
88
90 virtual std::shared_ptr
93
95};
96
97}
98}
99}
100
101namespace {
102
104 YAMLChecksumsSubsection()
106
107 void map(IO &IO) override;
108 std::shared_ptr
110 const codeview::StringsAndChecksums &SC) const override;
111 static Expected<std::shared_ptr>
112 fromCodeViewSubsection(const DebugStringTableSubsectionRef &Strings,
113 const DebugChecksumsSubsectionRef &FC);
114
115 std::vector Checksums;
116};
117
119 YAMLLinesSubsection() : YAMLSubsectionBase(DebugSubsectionKind::Lines) {}
120
121 void map(IO &IO) override;
122 std::shared_ptr
124 const codeview::StringsAndChecksums &SC) const override;
125 static Expected<std::shared_ptr>
126 fromCodeViewSubsection(const DebugStringTableSubsectionRef &Strings,
127 const DebugChecksumsSubsectionRef &Checksums,
128 const DebugLinesSubsectionRef &Lines);
129
130 SourceLineInfo Lines;
131};
132
134 YAMLInlineeLinesSubsection()
136
137 void map(IO &IO) override;
138 std::shared_ptr
140 const codeview::StringsAndChecksums &SC) const override;
141 static Expected<std::shared_ptr>
142 fromCodeViewSubsection(const DebugStringTableSubsectionRef &Strings,
143 const DebugChecksumsSubsectionRef &Checksums,
144 const DebugInlineeLinesSubsectionRef &Lines);
145
146 InlineeInfo InlineeLines;
147};
148
150 YAMLCrossModuleExportsSubsection()
152
153 void map(IO &IO) override;
154 std::shared_ptr
156 const codeview::StringsAndChecksums &SC) const override;
157 static Expected<std::shared_ptr>
158 fromCodeViewSubsection(const DebugCrossModuleExportsSubsectionRef &Exports);
159
160 std::vector Exports;
161};
162
164 YAMLCrossModuleImportsSubsection()
166
167 void map(IO &IO) override;
168 std::shared_ptr
170 const codeview::StringsAndChecksums &SC) const override;
171 static Expected<std::shared_ptr>
172 fromCodeViewSubsection(const DebugStringTableSubsectionRef &Strings,
173 const DebugCrossModuleImportsSubsectionRef &Imports);
174
175 std::vector Imports;
176};
177
179 YAMLSymbolsSubsection() : YAMLSubsectionBase(DebugSubsectionKind::Symbols) {}
180
181 void map(IO &IO) override;
182 std::shared_ptr
184 const codeview::StringsAndChecksums &SC) const override;
185 static Expected<std::shared_ptr>
186 fromCodeViewSubsection(const DebugSymbolsSubsectionRef &Symbols);
187
188 std::vectorCodeViewYAML::SymbolRecord Symbols;
189};
190
192 YAMLStringTableSubsection()
194
195 void map(IO &IO) override;
196 std::shared_ptr
198 const codeview::StringsAndChecksums &SC) const override;
199 static Expected<std::shared_ptr>
200 fromCodeViewSubsection(const DebugStringTableSubsectionRef &Strings);
201
202 std::vector Strings;
203};
204
206 YAMLFrameDataSubsection()
208
209 void map(IO &IO) override;
210 std::shared_ptr
212 const codeview::StringsAndChecksums &SC) const override;
213 static Expected<std::shared_ptr>
214 fromCodeViewSubsection(const DebugStringTableSubsectionRef &Strings,
215 const DebugFrameDataSubsectionRef &Frames);
216
217 std::vector Frames;
218};
219
221 YAMLCoffSymbolRVASubsection()
223
224 void map(IO &IO) override;
225 std::shared_ptr
227 const codeview::StringsAndChecksums &SC) const override;
228 static Expected<std::shared_ptr>
229 fromCodeViewSubsection(const DebugSymbolRVASubsectionRef &RVAs);
230
231 std::vector<uint32_t> RVAs;
232};
233
234}
235
239}
240
247}
248
251 StringRef Bytes(reinterpret_cast<const char *>(Value.Bytes.data()),
252 Value.Bytes.size());
253 Out << toHex(Bytes);
254}
255
259 Value.Bytes.assign(H.begin(), H.end());
261}
262
268}
269
273}
274
279}
280
284}
285
290}
291
297}
298
304}
305
315}
316
317void YAMLChecksumsSubsection::map(IO &IO) {
318 IO.mapTag("!FileChecksums", true);
320}
321
322void YAMLLinesSubsection::map(IO &IO) {
323 IO.mapTag("!Lines", true);
325
330}
331
332void YAMLInlineeLinesSubsection::map(IO &IO) {
333 IO.mapTag("!InlineeLines", true);
336}
337
338void YAMLCrossModuleExportsSubsection::map(IO &IO) {
339 IO.mapTag("!CrossModuleExports", true);
341}
342
343void YAMLCrossModuleImportsSubsection::map(IO &IO) {
344 IO.mapTag("!CrossModuleImports", true);
346}
347
348void YAMLSymbolsSubsection::map(IO &IO) {
349 IO.mapTag("!Symbols", true);
351}
352
353void YAMLStringTableSubsection::map(IO &IO) {
354 IO.mapTag("!StringTable", true);
356}
357
358void YAMLFrameDataSubsection::map(IO &IO) {
359 IO.mapTag("!FrameData", true);
361}
362
363void YAMLCoffSymbolRVASubsection::map(IO &IO) {
364 IO.mapTag("!COFFSymbolRVAs", true);
366}
367
368void MappingTraits::mapping(
369 IO &IO, YAMLDebugSubsection &Subsection) {
371 if (IO.mapTag("!FileChecksums")) {
372 auto SS = std::make_shared();
374 } else if (IO.mapTag("!Lines")) {
375 Subsection.Subsection = std::make_shared();
376 } else if (IO.mapTag("!InlineeLines")) {
377 Subsection.Subsection = std::make_shared();
378 } else if (IO.mapTag("!CrossModuleExports")) {
380 std::make_shared();
381 } else if (IO.mapTag("!CrossModuleImports")) {
383 std::make_shared();
384 } else if (IO.mapTag("!Symbols")) {
385 Subsection.Subsection = std::make_shared();
386 } else if (IO.mapTag("!StringTable")) {
387 Subsection.Subsection = std::make_shared();
388 } else if (IO.mapTag("!FrameData")) {
389 Subsection.Subsection = std::make_shared();
390 } else if (IO.mapTag("!COFFSymbolRVAs")) {
391 Subsection.Subsection = std::make_shared();
392 } else {
394 }
395 }
397}
398
399std::shared_ptr YAMLChecksumsSubsection::toCodeViewSubsection(
401 const codeview::StringsAndChecksums &SC) const {
403 auto Result = std::make_shared(*SC.strings());
404 for (const auto &CS : Checksums) {
405 Result->addChecksum(CS.FileName, CS.Kind, CS.ChecksumBytes.Bytes);
406 }
408}
409
410std::shared_ptr YAMLLinesSubsection::toCodeViewSubsection(
412 const codeview::StringsAndChecksums &SC) const {
415 std::make_shared(*SC.checksums(), *SC.strings());
417 Result->setRelocationAddress(Lines.RelocSegment, Lines.RelocOffset);
419 for (const auto &LC : Lines.Blocks) {
420 Result->createBlock(LC.FileName);
421 if (Result->hasColumnInfo()) {
422 for (auto Item : zip(LC.Lines, LC.Columns)) {
423 auto &L = std::get<0>(Item);
424 auto &C = std::get<1>(Item);
425 uint32_t LE = L.LineStart + L.EndDelta;
426 Result->addLineAndColumnInfo(L.Offset,
427 LineInfo(L.LineStart, LE, L.IsStatement),
428 C.StartColumn, C.EndColumn);
429 }
430 } else {
431 for (const auto &L : LC.Lines) {
432 uint32_t LE = L.LineStart + L.EndDelta;
433 Result->addLineInfo(L.Offset, LineInfo(L.LineStart, LE, L.IsStatement));
434 }
435 }
436 }
438}
439
440std::shared_ptr
441YAMLInlineeLinesSubsection::toCodeViewSubsection(
443 const codeview::StringsAndChecksums &SC) const {
445 auto Result = std::make_shared(
447
448 for (const auto &Site : InlineeLines.Sites) {
449 Result->addInlineSite(TypeIndex(Site.Inlinee), Site.FileName,
450 Site.SourceLineNum);
452 continue;
453
454 for (auto EF : Site.ExtraFiles) {
455 Result->addExtraFile(EF);
456 }
457 }
459}
460
461std::shared_ptr
462YAMLCrossModuleExportsSubsection::toCodeViewSubsection(
464 const codeview::StringsAndChecksums &SC) const {
465 auto Result = std::make_shared();
466 for (const auto &M : Exports)
467 Result->addMapping(M.Local, M.Global);
469}
470
471std::shared_ptr
472YAMLCrossModuleImportsSubsection::toCodeViewSubsection(
474 const codeview::StringsAndChecksums &SC) const {
476
478 std::make_shared(*SC.strings());
479 for (const auto &M : Imports) {
480 for (const auto Id : M.ImportIds)
481 Result->addImport(M.ModuleName, Id);
482 }
484}
485
486std::shared_ptr YAMLSymbolsSubsection::toCodeViewSubsection(
488 const codeview::StringsAndChecksums &SC) const {
489 auto Result = std::make_shared();
490 for (const auto &Sym : Symbols)
492 Sym.toCodeViewSymbol(Allocator, CodeViewContainer::ObjectFile));
494}
495
496std::shared_ptr
497YAMLStringTableSubsection::toCodeViewSubsection(
499 const codeview::StringsAndChecksums &SC) const {
500 auto Result = std::make_shared();
501 for (const auto &Str : this->Strings)
504}
505
506std::shared_ptr YAMLFrameDataSubsection::toCodeViewSubsection(
508 const codeview::StringsAndChecksums &SC) const {
510
511 auto Result = std::make_shared(true);
512 for (const auto &YF : Frames) {
514 F.CodeSize = YF.CodeSize;
515 F.Flags = YF.Flags;
516 F.LocalSize = YF.LocalSize;
517 F.MaxStackSize = YF.MaxStackSize;
518 F.ParamsSize = YF.ParamsSize;
519 F.PrologSize = YF.PrologSize;
520 F.RvaStart = YF.RvaStart;
521 F.SavedRegsSize = YF.SavedRegsSize;
522 F.FrameFunc = SC.strings()->insert(YF.FrameFunc);
524 }
526}
527
528std::shared_ptr
529YAMLCoffSymbolRVASubsection::toCodeViewSubsection(
531 const codeview::StringsAndChecksums &SC) const {
532 auto Result = std::make_shared();
533 for (const auto &RVA : RVAs)
536}
537
538static Expected
542 if (!ExpectedString)
543 return ExpectedString.takeError();
544
546 Result.ChecksumBytes.Bytes = CS.Checksum;
547 Result.Kind = CS.Kind;
548 Result.FileName = *ExpectedString;
549 return Result;
550}
551
552static Expected
555 auto Iter = Checksums.getArray().at(FileID);
560}
561
562Expected<std::shared_ptr>
563YAMLChecksumsSubsection::fromCodeViewSubsection(
564 const DebugStringTableSubsectionRef &Strings,
565 const DebugChecksumsSubsectionRef &FC) {
566 auto Result = std::make_shared();
567
568 for (const auto &CS : FC) {
570 if (!ConvertedCS)
571 return ConvertedCS.takeError();
572 Result->Checksums.push_back(*ConvertedCS);
573 }
575}
576
577Expected<std::shared_ptr>
578YAMLLinesSubsection::fromCodeViewSubsection(
579 const DebugStringTableSubsectionRef &Strings,
580 const DebugChecksumsSubsectionRef &Checksums,
581 const DebugLinesSubsectionRef &Lines) {
582 auto Result = std::make_shared();
583 Result->Lines.CodeSize = Lines.header()->CodeSize;
584 Result->Lines.RelocOffset = Lines.header()->RelocOffset;
585 Result->Lines.RelocSegment = Lines.header()->RelocSegment;
586 Result->Lines.Flags = static_cast<LineFlags>(uint16_t(Lines.header()->Flags));
587 for (const auto &L : Lines) {
588 SourceLineBlock Block;
589 auto EF = getFileName(Strings, Checksums, L.NameIndex);
590 if (!EF)
591 return EF.takeError();
592 Block.FileName = *EF;
593 if (Lines.hasColumnInfo()) {
594 for (const auto &C : L.Columns) {
595 SourceColumnEntry SCE;
596 SCE.EndColumn = C.EndColumn;
597 SCE.StartColumn = C.StartColumn;
598 Block.Columns.push_back(SCE);
599 }
600 }
601 for (const auto &LN : L.LineNumbers) {
602 SourceLineEntry SLE;
603 LineInfo LI(LN.Flags);
604 SLE.Offset = LN.Offset;
605 SLE.LineStart = LI.getStartLine();
606 SLE.EndDelta = LI.getLineDelta();
608 Block.Lines.push_back(SLE);
609 }
611 }
613}
614
615Expected<std::shared_ptr>
616YAMLInlineeLinesSubsection::fromCodeViewSubsection(
617 const DebugStringTableSubsectionRef &Strings,
618 const DebugChecksumsSubsectionRef &Checksums,
619 const DebugInlineeLinesSubsectionRef &Lines) {
620 auto Result = std::make_shared();
621
622 Result->InlineeLines.HasExtraFiles = Lines.hasExtraFiles();
623 for (const auto &IL : Lines) {
624 InlineeSite Site;
625 auto ExpF = getFileName(Strings, Checksums, IL.Header->FileID);
626 if (!ExpF)
627 return ExpF.takeError();
629 Site.Inlinee = IL.Header->Inlinee.getIndex();
631 if (Lines.hasExtraFiles()) {
632 for (const auto EF : IL.ExtraFiles) {
633 auto ExpF2 = getFileName(Strings, Checksums, EF);
634 if (!ExpF2)
635 return ExpF2.takeError();
637 }
638 }
639 Result->InlineeLines.Sites.push_back(Site);
640 }
642}
643
644Expected<std::shared_ptr>
645YAMLCrossModuleExportsSubsection::fromCodeViewSubsection(
646 const DebugCrossModuleExportsSubsectionRef &Exports) {
647 auto Result = std::make_shared();
648 Result->Exports.assign(Exports.begin(), Exports.end());
650}
651
652Expected<std::shared_ptr>
653YAMLCrossModuleImportsSubsection::fromCodeViewSubsection(
654 const DebugStringTableSubsectionRef &Strings,
655 const DebugCrossModuleImportsSubsectionRef &Imports) {
656 auto Result = std::make_shared();
657 for (const auto &CMI : Imports) {
658 YAMLCrossModuleImport YCMI;
659 auto ExpectedStr = Strings.getString(CMI.Header->ModuleNameOffset);
660 if (!ExpectedStr)
661 return ExpectedStr.takeError();
663 YCMI.ImportIds.assign(CMI.Imports.begin(), CMI.Imports.end());
664 Result->Imports.push_back(YCMI);
665 }
667}
668
669Expected<std::shared_ptr>
670YAMLSymbolsSubsection::fromCodeViewSubsection(
671 const DebugSymbolsSubsectionRef &Symbols) {
672 auto Result = std::make_shared();
673 for (const auto &Sym : Symbols) {
675 if (!S)
677 cv_error_code::corrupt_record,
678 "Invalid CodeView Symbol Record in SymbolRecord "
679 "subsection of .debug$S while converting to YAML!"),
680 S.takeError());
681
682 Result->Symbols.push_back(*S);
683 }
685}
686
687Expected<std::shared_ptr>
688YAMLStringTableSubsection::fromCodeViewSubsection(
689 const DebugStringTableSubsectionRef &Strings) {
690 auto Result = std::make_shared();
691 BinaryStreamReader Reader(Strings.getBuffer());
692 StringRef S;
693
694 if (auto EC = Reader.readCString(S))
695 return std::move(EC);
697 while (Reader.bytesRemaining() > 0) {
698 if (auto EC = Reader.readCString(S))
699 return std::move(EC);
700 Result->Strings.push_back(S);
701 }
703}
704
705Expected<std::shared_ptr>
706YAMLFrameDataSubsection::fromCodeViewSubsection(
707 const DebugStringTableSubsectionRef &Strings,
708 const DebugFrameDataSubsectionRef &Frames) {
709 auto Result = std::make_shared();
710 for (const auto &F : Frames) {
711 YAMLFrameData YF;
720
721 auto ES = Strings.getString(F.FrameFunc);
722 if (!ES)
725 cv_error_code::no_records,
726 "Could not find string for string id while mapping FrameData!"),
727 ES.takeError());
729 Result->Frames.push_back(YF);
730 }
732}
733
734Expected<std::shared_ptr>
735YAMLCoffSymbolRVASubsection::fromCodeViewSubsection(
736 const DebugSymbolRVASubsectionRef &Section) {
737 auto Result = std::make_shared();
740}
741
742Expected<std::vector<std::shared_ptr>>
746 std::vector<std::shared_ptr> Result;
747 if (Subsections.empty())
748 return std::move(Result);
749
750 for (const auto &SS : Subsections) {
751 std::shared_ptr CVS;
752 CVS = SS.Subsection->toCodeViewSubsection(Allocator, SC);
753 assert(CVS != nullptr);
754 Result.push_back(std::move(CVS));
755 }
756 return std::move(Result);
757}
758
759namespace {
760
762 SubsectionConversionVisitor() = default;
763
783
785};
786
787}
788
789Error SubsectionConversionVisitor::visitUnknown(
790 DebugUnknownSubsectionRef &Unknown) {
792}
793
794Error SubsectionConversionVisitor::visitLines(
795 DebugLinesSubsectionRef &Lines, const StringsAndChecksumsRef &State) {
796 auto Result = YAMLLinesSubsection::fromCodeViewSubsection(
798 if (!Result)
799 return Result.takeError();
802}
803
804Error SubsectionConversionVisitor::visitFileChecksums(
805 DebugChecksumsSubsectionRef &Checksums,
806 const StringsAndChecksumsRef &State) {
807 auto Result = YAMLChecksumsSubsection::fromCodeViewSubsection(State.strings(),
808 Checksums);
809 if (!Result)
810 return Result.takeError();
813}
814
815Error SubsectionConversionVisitor::visitInlineeLines(
816 DebugInlineeLinesSubsectionRef &Inlinees,
817 const StringsAndChecksumsRef &State) {
818 auto Result = YAMLInlineeLinesSubsection::fromCodeViewSubsection(
820 if (!Result)
821 return Result.takeError();
824}
825
826Error SubsectionConversionVisitor::visitCrossModuleExports(
827 DebugCrossModuleExportsSubsectionRef &Exports,
828 const StringsAndChecksumsRef &State) {
830 YAMLCrossModuleExportsSubsection::fromCodeViewSubsection(Exports);
831 if (!Result)
832 return Result.takeError();
835}
836
837Error SubsectionConversionVisitor::visitCrossModuleImports(
838 DebugCrossModuleImportsSubsectionRef &Imports,
839 const StringsAndChecksumsRef &State) {
840 auto Result = YAMLCrossModuleImportsSubsection::fromCodeViewSubsection(
841 State.strings(), Imports);
842 if (!Result)
843 return Result.takeError();
846}
847
848Error SubsectionConversionVisitor::visitStringTable(
849 DebugStringTableSubsectionRef &Strings,
850 const StringsAndChecksumsRef &State) {
851 auto Result = YAMLStringTableSubsection::fromCodeViewSubsection(Strings);
852 if (!Result)
853 return Result.takeError();
856}
857
858Error SubsectionConversionVisitor::visitSymbols(
859 DebugSymbolsSubsectionRef &Symbols, const StringsAndChecksumsRef &State) {
860 auto Result = YAMLSymbolsSubsection::fromCodeViewSubsection(Symbols);
861 if (!Result)
862 return Result.takeError();
865}
866
867Error SubsectionConversionVisitor::visitFrameData(
868 DebugFrameDataSubsectionRef &Frames, const StringsAndChecksumsRef &State) {
870 YAMLFrameDataSubsection::fromCodeViewSubsection(State.strings(), Frames);
871 if (!Result)
872 return Result.takeError();
875}
876
877Error SubsectionConversionVisitor::visitCOFFSymbolRVAs(
878 DebugSymbolRVASubsectionRef &RVAs, const StringsAndChecksumsRef &State) {
879 auto Result = YAMLCoffSymbolRVASubsection::fromCodeViewSubsection(RVAs);
880 if (!Result)
881 return Result.takeError();
884}
885
886Expected
889 SubsectionConversionVisitor V;
891 return std::move(EC);
892
893 return V.Subsection;
894}
895
896std::vector
901
902 ExitOnError Err("Invalid .debug$S section!");
905
908
909 std::vector Result;
910
911 for (const auto &SS : Subsections) {
913 Result.push_back(YamlSS);
914 }
915 return Result;
916}
917
920
922
923
924
925
926
927
928
929
931 for (const auto &SS : Sections) {
933 continue;
934
935 auto Result = SS.Subsection->toCodeViewSubsection(Allocator, SC);
937 std::static_pointer_cast(Result));
938 break;
939 }
940 }
941
943 for (const auto &SS : Sections) {
945 continue;
946
947 auto Result = SS.Subsection->toCodeViewSubsection(Allocator, SC);
949 std::static_pointer_cast(Result));
950 break;
951 }
952 }
953}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the BumpPtrAllocator interface.
static Expected< StringRef > getFileName(const DebugStringTableSubsectionRef &Strings, const DebugChecksumsSubsectionRef &Checksums, uint32_t FileID)
Definition CodeViewYAMLDebugSections.cpp:553
static Expected< SourceFileChecksumEntry > convertOneChecksum(const DebugStringTableSubsectionRef &Strings, const FileChecksumEntry &CS)
Definition CodeViewYAMLDebugSections.cpp:539
#define LLVM_YAML_DECLARE_BITSET_TRAITS(Type)
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
Utility for declaring that a std::vector of a particular type should be considered a YAML sequence.
#define LLVM_YAML_DECLARE_SCALAR_TRAITS(Type, MustQuote)
#define LLVM_YAML_DECLARE_MAPPING_TRAITS(Type)
#define LLVM_YAML_DECLARE_ENUM_TRAITS(Type)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
bool empty() const
empty - Check if the array is empty.
Provides read only access to a subclass of BinaryStream.
Error readInteger(T &Dest)
Read an integer of the specified endianness into Dest and update the stream's offset.
uint64_t bytesRemaining() const
Error readArray(ArrayRef< T > &Array, uint32_t NumElements)
Get a reference to a NumElements element array of objects of type T from the underlying stream as if ...
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Helper for check-and-exit error handling.
StringRef - Represent a constant reference to a string, i.e.
constexpr bool empty() const
empty - Check if the string is empty.
LLVM Value Representation.
Iterator at(uint32_t Offset) const
given an offset into the array's underlying stream, return an iterator to the record at that offset.
const FileChecksumArray & getArray() const
Represents a read-only view of a CodeView string table.
BinaryStreamRef getBuffer() const
LLVM_ABI Expected< StringRef > getString(uint32_t Offset) const
const DebugStringTableSubsectionRef & strings() const
const DebugChecksumsSubsectionRef & checksums() const
void setStrings(const StringsPtr &SP)
bool hasChecksums() const
const StringsPtr & strings() const
void setChecksums(const ChecksumsPtr &CP)
const ChecksumsPtr & checksums() const
This class implements an extremely fast bulk output stream that can only output to a stream.
void bitSetCase(T &Val, StringRef Str, const T ConstVal)
virtual bool outputting() const =0
virtual bool mapTag(StringRef Tag, bool Default=false)=0
void enumCase(T &Val, StringRef Str, const T ConstVal)
void mapOptional(StringRef Key, T &Val)
void enumFallback(T &Val)
void mapRequired(StringRef Key, T &Val)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ C
The default llvm calling convention, compatible with C.
LLVM_ABI void initializeStringsAndChecksums(ArrayRef< YAMLDebugSubsection > Sections, codeview::StringsAndChecksums &SC)
Definition CodeViewYAMLDebugSections.cpp:918
LLVM_ABI Expected< std::vector< std::shared_ptr< codeview::DebugSubsection > > > toCodeViewSubsectionList(BumpPtrAllocator &Allocator, ArrayRef< YAMLDebugSubsection > Subsections, const codeview::StringsAndChecksums &SC)
Definition CodeViewYAMLDebugSections.cpp:743
LLVM_ABI std::vector< YAMLDebugSubsection > fromDebugS(ArrayRef< uint8_t > Data, const codeview::StringsAndChecksumsRef &SC)
Definition CodeViewYAMLDebugSections.cpp:897
Error visitDebugSubsection(const DebugSubsectionRecord &R, DebugSubsectionVisitor &V, const StringsAndChecksumsRef &State)
VarStreamArray< DebugSubsectionRecord > DebugSubsectionArray
This is an optimization pass for GlobalISel generic memory operations.
detail::zippy< detail::zip_shortest, T, U, Args... > zip(T &&t, U &&u, Args &&...args)
zip iterator for two or more iteratable types.
std::string fromHex(StringRef Input)
Convert hexadecimal string Input to its binary representation. The return string is half the size of ...
void append_range(Container &C, Range &&R)
Wrapper function to append range R to container C.
Error joinErrors(Error E1, Error E2)
Concatenate errors.
Error make_error(ArgTs &&... Args)
Make a Error instance representing failure using the given error info type.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
void toHex(ArrayRef< uint8_t > Input, bool LowerCase, SmallVectorImpl< char > &Output)
Convert buffer Input to its hexadecimal representation. The returned string is double the size of Inp...
@ SCE
Tune debug info for SCE targets (e.g. PS4).
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
std::vector< StringRef > ExtraFiles
static LLVM_ABI Expected< SymbolRecord > fromCodeViewSymbol(codeview::CVSymbol Symbol)
std::vector< uint32_t > ImportIds
std::shared_ptr< detail::YAMLSubsectionBase > Subsection
static LLVM_ABI Expected< YAMLDebugSubsection > fromCodeViewSubection(const codeview::StringsAndChecksumsRef &SC, const codeview::DebugSubsectionRecord &SS)
Definition CodeViewYAMLDebugSections.cpp:887
virtual void map(IO &IO)=0
virtual ~YAMLSubsectionBase()=default
YAMLSubsectionBase(DebugSubsectionKind Kind)
Definition CodeViewYAMLDebugSections.cpp:86
DebugSubsectionKind Kind
Definition CodeViewYAMLDebugSections.cpp:94
virtual std::shared_ptr< DebugSubsection > toCodeViewSubsection(BumpPtrAllocator &Allocator, const codeview::StringsAndChecksums &SC) const =0
ArrayRef< uint8_t > Checksum
This class should be specialized by any type that needs to be converted to/from a YAML mapping.
This class should be specialized by any integer type that is a union of bit values and the YAML repre...
This class should be specialized by any integral type that converts to/from a YAML scalar where there...
This class should be specialized by type that requires custom conversion to/from a yaml scalar.