|
38 | 38 | #include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h" |
39 | 39 | #include "llvm/DebugInfo/CodeView/MergingTypeTableBuilder.h" |
40 | 40 | #include "llvm/DebugInfo/CodeView/StringsAndChecksums.h" |
| 41 | +#include "llvm/DebugInfo/CodeView/SymbolDeserializer.h" |
41 | 42 | #include "llvm/DebugInfo/CodeView/TypeStreamMerger.h" |
42 | 43 | #include "llvm/DebugInfo/MSF/MSFBuilder.h" |
43 | 44 | #include "llvm/DebugInfo/MSF/MappedBlockStream.h" |
|
49 | 50 | #include "llvm/DebugInfo/PDB/IPDBSession.h" |
50 | 51 | #include "llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h" |
51 | 52 | #include "llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h" |
| 53 | +#include "llvm/DebugInfo/PDB/Native/GSIStreamBuilder.h" |
52 | 54 | #include "llvm/DebugInfo/PDB/Native/InfoStream.h" |
53 | 55 | #include "llvm/DebugInfo/PDB/Native/InfoStreamBuilder.h" |
54 | 56 | #include "llvm/DebugInfo/PDB/Native/InputFile.h" |
@@ -880,6 +882,24 @@ static void yamlToPdb(StringRef Path) { |
880 | 882 | IpiBuilder.addTypeRecord(Type.RecordData, std::nullopt); |
881 | 883 | } |
882 | 884 |
|
| 885 | + if (YamlObj.PublicsStream) { |
| 886 | + auto &GsiBuilder = Builder.getGsiBuilder(); |
| 887 | + std::vector<BulkPublic> BulkPublics; |
| 888 | + for (const auto &P : YamlObj.PublicsStream->PubSyms) { |
| 889 | + CVSymbol CV = P.toCodeViewSymbol(Allocator, CodeViewContainer::Pdb); |
| 890 | + auto PS = cantFail(SymbolDeserializer::deserializeAs<PublicSym32>(CV)); |
| 891 | + |
| 892 | + BulkPublic BP; |
| 893 | + BP.Name = PS.Name.data(); |
| 894 | + BP.NameLen = PS.Name.size(); |
| 895 | + BP.setFlags(PS.Flags); |
| 896 | + BP.Offset = PS.Offset; |
| 897 | + BP.Segment = PS.Segment; |
| 898 | + BulkPublics.emplace_back(BP); |
| 899 | + } |
| 900 | + GsiBuilder.addPublicSymbols(std::move(BulkPublics)); |
| 901 | + } |
| 902 | + |
883 | 903 | Builder.getStringTableBuilder().setStrings(*Strings.strings()); |
884 | 904 |
|
885 | 905 | codeview::GUID IgnoredOutGuid; |
|
0 commit comments