Zachary Turner | 7120a47 | 2016-06-06 20:37:05 +0000 | [diff] [blame] | 1 | //===- PdbYAML.cpp -------------------------------------------- *- C++ --*-===// |
| 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 | #include "PdbYaml.h" |
Zachary Turner | 2f951ce | 2016-08-31 21:42:26 +0000 | [diff] [blame] | 11 | |
Zachary Turner | c6d54da | 2016-09-09 17:46:17 +0000 | [diff] [blame] | 12 | #include "YamlSerializationContext.h" |
Zachary Turner | 3b14764 | 2016-10-08 01:12:01 +0000 | [diff] [blame] | 13 | #include "YamlSymbolDumper.h" |
| 14 | #include "YamlTypeDumper.h" |
Zachary Turner | 7120a47 | 2016-06-06 20:37:05 +0000 | [diff] [blame] | 15 | |
Zachary Turner | 3b14764 | 2016-10-08 01:12:01 +0000 | [diff] [blame] | 16 | #include "llvm/DebugInfo/CodeView/CVSymbolVisitor.h" |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 17 | #include "llvm/DebugInfo/CodeView/CVTypeVisitor.h" |
Zachary Turner | 3b14764 | 2016-10-08 01:12:01 +0000 | [diff] [blame] | 18 | #include "llvm/DebugInfo/CodeView/SymbolDeserializer.h" |
| 19 | #include "llvm/DebugInfo/CodeView/SymbolVisitorCallbackPipeline.h" |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 20 | #include "llvm/DebugInfo/CodeView/TypeDeserializer.h" |
Zachary Turner | 4efa0a4 | 2016-11-08 22:24:53 +0000 | [diff] [blame] | 21 | #include "llvm/DebugInfo/CodeView/TypeSerializer.h" |
Zachary Turner | 2f951ce | 2016-08-31 21:42:26 +0000 | [diff] [blame] | 22 | #include "llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h" |
Adrian McCarthy | 6b6b8c4 | 2017-01-25 22:38:55 +0000 | [diff] [blame^] | 23 | #include "llvm/DebugInfo/PDB/Native/PDBFile.h" |
| 24 | #include "llvm/DebugInfo/PDB/Native/TpiHashing.h" |
Zachary Turner | 8848a7a | 2016-07-06 18:05:57 +0000 | [diff] [blame] | 25 | #include "llvm/DebugInfo/PDB/PDBExtras.h" |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 26 | #include "llvm/DebugInfo/PDB/PDBTypes.h" |
Zachary Turner | 7120a47 | 2016-06-06 20:37:05 +0000 | [diff] [blame] | 27 | |
| 28 | using namespace llvm; |
| 29 | using namespace llvm::pdb; |
| 30 | using namespace llvm::pdb::yaml; |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 31 | using namespace llvm::yaml; |
| 32 | |
| 33 | LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(uint32_t) |
| 34 | LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::StringRef) |
| 35 | LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::pdb::yaml::NamedStreamMapping) |
| 36 | LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::pdb::yaml::PdbDbiModuleInfo) |
Zachary Turner | 3b14764 | 2016-10-08 01:12:01 +0000 | [diff] [blame] | 37 | LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::pdb::yaml::PdbSymbolRecord) |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 38 | LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::pdb::yaml::PdbTpiRecord) |
| 39 | LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::pdb::yaml::StreamBlockList) |
Zachary Turner | 7120a47 | 2016-06-06 20:37:05 +0000 | [diff] [blame] | 40 | |
Zachary Turner | 8848a7a | 2016-07-06 18:05:57 +0000 | [diff] [blame] | 41 | namespace llvm { |
| 42 | namespace yaml { |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 43 | |
Zachary Turner | 8848a7a | 2016-07-06 18:05:57 +0000 | [diff] [blame] | 44 | template <> struct ScalarTraits<llvm::pdb::PDB_UniqueId> { |
| 45 | static void output(const llvm::pdb::PDB_UniqueId &S, void *, |
| 46 | llvm::raw_ostream &OS) { |
| 47 | OS << S; |
| 48 | } |
| 49 | |
| 50 | static StringRef input(StringRef Scalar, void *Ctx, |
| 51 | llvm::pdb::PDB_UniqueId &S) { |
| 52 | if (Scalar.size() != 38) |
| 53 | return "GUID strings are 38 characters long"; |
| 54 | if (Scalar[0] != '{' || Scalar[37] != '}') |
| 55 | return "GUID is not enclosed in {}"; |
| 56 | if (Scalar[9] != '-' || Scalar[14] != '-' || Scalar[19] != '-' || |
| 57 | Scalar[24] != '-') |
| 58 | return "GUID sections are not properly delineated with dashes"; |
| 59 | |
Saleem Abdulrasool | de9f00e | 2016-12-30 19:42:13 +0000 | [diff] [blame] | 60 | uint8_t *OutBuffer = S.Guid; |
Zachary Turner | 8848a7a | 2016-07-06 18:05:57 +0000 | [diff] [blame] | 61 | for (auto Iter = Scalar.begin(); Iter != Scalar.end();) { |
| 62 | if (*Iter == '-' || *Iter == '{' || *Iter == '}') { |
| 63 | ++Iter; |
| 64 | continue; |
| 65 | } |
| 66 | uint8_t Value = (llvm::hexDigitValue(*Iter) << 4); |
| 67 | ++Iter; |
| 68 | Value |= llvm::hexDigitValue(*Iter); |
| 69 | ++Iter; |
| 70 | *OutBuffer++ = Value; |
| 71 | } |
| 72 | |
| 73 | return ""; |
| 74 | } |
| 75 | |
| 76 | static bool mustQuote(StringRef Scalar) { return needsQuotes(Scalar); } |
| 77 | }; |
Zachary Turner | dbeaea7 | 2016-07-11 21:45:26 +0000 | [diff] [blame] | 78 | |
| 79 | template <> struct ScalarEnumerationTraits<llvm::pdb::PDB_Machine> { |
| 80 | static void enumeration(IO &io, llvm::pdb::PDB_Machine &Value) { |
| 81 | io.enumCase(Value, "Invalid", PDB_Machine::Invalid); |
| 82 | io.enumCase(Value, "Am33", PDB_Machine::Am33); |
| 83 | io.enumCase(Value, "Amd64", PDB_Machine::Amd64); |
| 84 | io.enumCase(Value, "Arm", PDB_Machine::Arm); |
| 85 | io.enumCase(Value, "ArmNT", PDB_Machine::ArmNT); |
| 86 | io.enumCase(Value, "Ebc", PDB_Machine::Ebc); |
| 87 | io.enumCase(Value, "x86", PDB_Machine::x86); |
| 88 | io.enumCase(Value, "Ia64", PDB_Machine::Ia64); |
| 89 | io.enumCase(Value, "M32R", PDB_Machine::M32R); |
| 90 | io.enumCase(Value, "Mips16", PDB_Machine::Mips16); |
| 91 | io.enumCase(Value, "MipsFpu", PDB_Machine::MipsFpu); |
| 92 | io.enumCase(Value, "MipsFpu16", PDB_Machine::MipsFpu16); |
| 93 | io.enumCase(Value, "PowerPCFP", PDB_Machine::PowerPCFP); |
| 94 | io.enumCase(Value, "R4000", PDB_Machine::R4000); |
| 95 | io.enumCase(Value, "SH3", PDB_Machine::SH3); |
| 96 | io.enumCase(Value, "SH3DSP", PDB_Machine::SH3DSP); |
| 97 | io.enumCase(Value, "Thumb", PDB_Machine::Thumb); |
| 98 | io.enumCase(Value, "WceMipsV2", PDB_Machine::WceMipsV2); |
| 99 | } |
| 100 | }; |
| 101 | |
| 102 | template <> struct ScalarEnumerationTraits<llvm::pdb::PdbRaw_DbiVer> { |
| 103 | static void enumeration(IO &io, llvm::pdb::PdbRaw_DbiVer &Value) { |
| 104 | io.enumCase(Value, "V41", llvm::pdb::PdbRaw_DbiVer::PdbDbiVC41); |
| 105 | io.enumCase(Value, "V50", llvm::pdb::PdbRaw_DbiVer::PdbDbiV50); |
| 106 | io.enumCase(Value, "V60", llvm::pdb::PdbRaw_DbiVer::PdbDbiV60); |
| 107 | io.enumCase(Value, "V70", llvm::pdb::PdbRaw_DbiVer::PdbDbiV70); |
| 108 | io.enumCase(Value, "V110", llvm::pdb::PdbRaw_DbiVer::PdbDbiV110); |
| 109 | } |
| 110 | }; |
| 111 | |
| 112 | template <> struct ScalarEnumerationTraits<llvm::pdb::PdbRaw_ImplVer> { |
| 113 | static void enumeration(IO &io, llvm::pdb::PdbRaw_ImplVer &Value) { |
| 114 | io.enumCase(Value, "VC2", llvm::pdb::PdbRaw_ImplVer::PdbImplVC2); |
| 115 | io.enumCase(Value, "VC4", llvm::pdb::PdbRaw_ImplVer::PdbImplVC4); |
| 116 | io.enumCase(Value, "VC41", llvm::pdb::PdbRaw_ImplVer::PdbImplVC41); |
| 117 | io.enumCase(Value, "VC50", llvm::pdb::PdbRaw_ImplVer::PdbImplVC50); |
| 118 | io.enumCase(Value, "VC98", llvm::pdb::PdbRaw_ImplVer::PdbImplVC98); |
| 119 | io.enumCase(Value, "VC70Dep", llvm::pdb::PdbRaw_ImplVer::PdbImplVC70Dep); |
| 120 | io.enumCase(Value, "VC70", llvm::pdb::PdbRaw_ImplVer::PdbImplVC70); |
| 121 | io.enumCase(Value, "VC80", llvm::pdb::PdbRaw_ImplVer::PdbImplVC80); |
| 122 | io.enumCase(Value, "VC110", llvm::pdb::PdbRaw_ImplVer::PdbImplVC110); |
| 123 | io.enumCase(Value, "VC140", llvm::pdb::PdbRaw_ImplVer::PdbImplVC140); |
| 124 | } |
| 125 | }; |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 126 | |
| 127 | template <> struct ScalarEnumerationTraits<llvm::pdb::PdbRaw_TpiVer> { |
| 128 | static void enumeration(IO &io, llvm::pdb::PdbRaw_TpiVer &Value) { |
| 129 | io.enumCase(Value, "VC40", llvm::pdb::PdbRaw_TpiVer::PdbTpiV40); |
| 130 | io.enumCase(Value, "VC41", llvm::pdb::PdbRaw_TpiVer::PdbTpiV41); |
| 131 | io.enumCase(Value, "VC50", llvm::pdb::PdbRaw_TpiVer::PdbTpiV50); |
| 132 | io.enumCase(Value, "VC70", llvm::pdb::PdbRaw_TpiVer::PdbTpiV70); |
| 133 | io.enumCase(Value, "VC80", llvm::pdb::PdbRaw_TpiVer::PdbTpiV80); |
| 134 | } |
| 135 | }; |
Zachary Turner | 8848a7a | 2016-07-06 18:05:57 +0000 | [diff] [blame] | 136 | } |
| 137 | } |
| 138 | |
Zachary Turner | dbeaea7 | 2016-07-11 21:45:26 +0000 | [diff] [blame] | 139 | void MappingTraits<PdbObject>::mapping(IO &IO, PdbObject &Obj) { |
| 140 | IO.mapOptional("MSF", Obj.Headers); |
| 141 | IO.mapOptional("StreamSizes", Obj.StreamSizes); |
| 142 | IO.mapOptional("StreamMap", Obj.StreamMap); |
Zachary Turner | 760ad4d | 2017-01-20 22:42:09 +0000 | [diff] [blame] | 143 | IO.mapOptional("StringTable", Obj.StringTable); |
Zachary Turner | dbeaea7 | 2016-07-11 21:45:26 +0000 | [diff] [blame] | 144 | IO.mapOptional("PdbStream", Obj.PdbStream); |
| 145 | IO.mapOptional("DbiStream", Obj.DbiStream); |
Zachary Turner | c6d54da | 2016-09-09 17:46:17 +0000 | [diff] [blame] | 146 | IO.mapOptionalWithContext("TpiStream", Obj.TpiStream, Obj.Allocator); |
Zachary Turner | de9ba15 | 2016-09-15 18:22:31 +0000 | [diff] [blame] | 147 | IO.mapOptionalWithContext("IpiStream", Obj.IpiStream, Obj.Allocator); |
Zachary Turner | dbeaea7 | 2016-07-11 21:45:26 +0000 | [diff] [blame] | 148 | } |
| 149 | |
Zachary Turner | a3225b0 | 2016-07-29 20:56:36 +0000 | [diff] [blame] | 150 | void MappingTraits<MSFHeaders>::mapping(IO &IO, MSFHeaders &Obj) { |
Zachary Turner | dbeaea7 | 2016-07-11 21:45:26 +0000 | [diff] [blame] | 151 | IO.mapRequired("SuperBlock", Obj.SuperBlock); |
| 152 | IO.mapRequired("NumDirectoryBlocks", Obj.NumDirectoryBlocks); |
Zachary Turner | dbeaea7 | 2016-07-11 21:45:26 +0000 | [diff] [blame] | 153 | IO.mapRequired("DirectoryBlocks", Obj.DirectoryBlocks); |
| 154 | IO.mapRequired("NumStreams", Obj.NumStreams); |
| 155 | IO.mapRequired("FileSize", Obj.FileSize); |
| 156 | } |
| 157 | |
Zachary Turner | faa554b | 2016-07-15 22:16:56 +0000 | [diff] [blame] | 158 | void MappingTraits<msf::SuperBlock>::mapping(IO &IO, msf::SuperBlock &SB) { |
Zachary Turner | 1dc9fd3 | 2016-06-14 20:48:36 +0000 | [diff] [blame] | 159 | if (!IO.outputting()) { |
Zachary Turner | faa554b | 2016-07-15 22:16:56 +0000 | [diff] [blame] | 160 | ::memcpy(SB.MagicBytes, msf::Magic, sizeof(msf::Magic)); |
Zachary Turner | 1dc9fd3 | 2016-06-14 20:48:36 +0000 | [diff] [blame] | 161 | } |
| 162 | |
| 163 | IO.mapRequired("BlockSize", SB.BlockSize); |
Zachary Turner | b927e02 | 2016-07-15 22:17:19 +0000 | [diff] [blame] | 164 | IO.mapRequired("FreeBlockMap", SB.FreeBlockMapBlock); |
Zachary Turner | 1dc9fd3 | 2016-06-14 20:48:36 +0000 | [diff] [blame] | 165 | IO.mapRequired("NumBlocks", SB.NumBlocks); |
| 166 | IO.mapRequired("NumDirectoryBytes", SB.NumDirectoryBytes); |
| 167 | IO.mapRequired("Unknown1", SB.Unknown1); |
| 168 | IO.mapRequired("BlockMapAddr", SB.BlockMapAddr); |
| 169 | } |
| 170 | |
| 171 | void MappingTraits<StreamBlockList>::mapping(IO &IO, StreamBlockList &SB) { |
| 172 | IO.mapRequired("Stream", SB.Blocks); |
| 173 | } |
| 174 | |
Zachary Turner | 8848a7a | 2016-07-06 18:05:57 +0000 | [diff] [blame] | 175 | void MappingTraits<PdbInfoStream>::mapping(IO &IO, PdbInfoStream &Obj) { |
| 176 | IO.mapRequired("Age", Obj.Age); |
| 177 | IO.mapRequired("Guid", Obj.Guid); |
| 178 | IO.mapRequired("Signature", Obj.Signature); |
| 179 | IO.mapRequired("Version", Obj.Version); |
Zachary Turner | dbeaea7 | 2016-07-11 21:45:26 +0000 | [diff] [blame] | 180 | } |
| 181 | |
| 182 | void MappingTraits<PdbDbiStream>::mapping(IO &IO, PdbDbiStream &Obj) { |
| 183 | IO.mapRequired("VerHeader", Obj.VerHeader); |
| 184 | IO.mapRequired("Age", Obj.Age); |
| 185 | IO.mapRequired("BuildNumber", Obj.BuildNumber); |
| 186 | IO.mapRequired("PdbDllVersion", Obj.PdbDllVersion); |
| 187 | IO.mapRequired("PdbDllRbld", Obj.PdbDllRbld); |
| 188 | IO.mapRequired("Flags", Obj.Flags); |
| 189 | IO.mapRequired("MachineType", Obj.MachineType); |
Zachary Turner | d218c26 | 2016-07-22 15:46:37 +0000 | [diff] [blame] | 190 | IO.mapOptional("Modules", Obj.ModInfos); |
Zachary Turner | dbeaea7 | 2016-07-11 21:45:26 +0000 | [diff] [blame] | 191 | } |
Zachary Turner | 5e534c7 | 2016-07-15 22:17:08 +0000 | [diff] [blame] | 192 | |
Zachary Turner | c6d54da | 2016-09-09 17:46:17 +0000 | [diff] [blame] | 193 | void MappingContextTraits<PdbTpiStream, BumpPtrAllocator>::mapping( |
| 194 | IO &IO, pdb::yaml::PdbTpiStream &Obj, BumpPtrAllocator &Allocator) { |
| 195 | // Create a single serialization context that will be passed through the |
| 196 | // entire process of serializing / deserializing a Tpi Stream. This is |
| 197 | // especially important when we are going from Pdb -> Yaml because we need |
| 198 | // to maintain state in a TypeTableBuilder across mappings, and at the end of |
| 199 | // the entire process, we need to have one TypeTableBuilder that has every |
| 200 | // record. |
| 201 | pdb::yaml::SerializationContext Context(IO, Allocator); |
| 202 | |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 203 | IO.mapRequired("Version", Obj.Version); |
Zachary Turner | c6d54da | 2016-09-09 17:46:17 +0000 | [diff] [blame] | 204 | IO.mapRequired("Records", Obj.Records, Context); |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 205 | } |
| 206 | |
Zachary Turner | 5e534c7 | 2016-07-15 22:17:08 +0000 | [diff] [blame] | 207 | void MappingTraits<NamedStreamMapping>::mapping(IO &IO, |
| 208 | NamedStreamMapping &Obj) { |
| 209 | IO.mapRequired("Name", Obj.StreamName); |
| 210 | IO.mapRequired("StreamNum", Obj.StreamNumber); |
| 211 | } |
Zachary Turner | d218c26 | 2016-07-22 15:46:37 +0000 | [diff] [blame] | 212 | |
Zachary Turner | 3b14764 | 2016-10-08 01:12:01 +0000 | [diff] [blame] | 213 | void MappingTraits<PdbSymbolRecord>::mapping(IO &IO, PdbSymbolRecord &Obj) { |
| 214 | codeview::SymbolVisitorCallbackPipeline Pipeline; |
| 215 | codeview::SymbolDeserializer Deserializer(nullptr); |
| 216 | codeview::yaml::YamlSymbolDumper Dumper(IO); |
| 217 | |
| 218 | if (IO.outputting()) { |
| 219 | // For PDB to Yaml, deserialize into a high level record type, then dump it. |
| 220 | Pipeline.addCallbackToPipeline(Deserializer); |
| 221 | Pipeline.addCallbackToPipeline(Dumper); |
| 222 | } else { |
| 223 | return; |
| 224 | } |
| 225 | |
| 226 | codeview::CVSymbolVisitor Visitor(Pipeline); |
| 227 | consumeError(Visitor.visitSymbolRecord(Obj.Record)); |
| 228 | } |
| 229 | |
| 230 | void MappingTraits<PdbModiStream>::mapping(IO &IO, PdbModiStream &Obj) { |
| 231 | IO.mapRequired("Signature", Obj.Signature); |
| 232 | IO.mapRequired("Records", Obj.Symbols); |
| 233 | } |
| 234 | |
Zachary Turner | d218c26 | 2016-07-22 15:46:37 +0000 | [diff] [blame] | 235 | void MappingTraits<PdbDbiModuleInfo>::mapping(IO &IO, PdbDbiModuleInfo &Obj) { |
| 236 | IO.mapRequired("Module", Obj.Mod); |
| 237 | IO.mapRequired("ObjFile", Obj.Obj); |
| 238 | IO.mapOptional("SourceFiles", Obj.SourceFiles); |
Zachary Turner | 3b14764 | 2016-10-08 01:12:01 +0000 | [diff] [blame] | 239 | IO.mapOptional("Modi", Obj.Modi); |
Zachary Turner | d218c26 | 2016-07-22 15:46:37 +0000 | [diff] [blame] | 240 | } |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 241 | |
Zachary Turner | c6d54da | 2016-09-09 17:46:17 +0000 | [diff] [blame] | 242 | void MappingContextTraits<PdbTpiRecord, pdb::yaml::SerializationContext>:: |
| 243 | mapping(IO &IO, pdb::yaml::PdbTpiRecord &Obj, |
| 244 | pdb::yaml::SerializationContext &Context) { |
| 245 | codeview::TypeVisitorCallbackPipeline Pipeline; |
| 246 | codeview::TypeDeserializer Deserializer; |
Zachary Turner | 4efa0a4 | 2016-11-08 22:24:53 +0000 | [diff] [blame] | 247 | codeview::TypeSerializer Serializer(Context.Allocator); |
Zachary Turner | 620961d | 2016-09-14 23:00:02 +0000 | [diff] [blame] | 248 | pdb::TpiHashUpdater Hasher; |
Zachary Turner | c6d54da | 2016-09-09 17:46:17 +0000 | [diff] [blame] | 249 | |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 250 | if (IO.outputting()) { |
Zachary Turner | c6d54da | 2016-09-09 17:46:17 +0000 | [diff] [blame] | 251 | // For PDB to Yaml, deserialize into a high level record type, then dump it. |
Zachary Turner | 2f951ce | 2016-08-31 21:42:26 +0000 | [diff] [blame] | 252 | Pipeline.addCallbackToPipeline(Deserializer); |
Zachary Turner | c6d54da | 2016-09-09 17:46:17 +0000 | [diff] [blame] | 253 | Pipeline.addCallbackToPipeline(Context.Dumper); |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 254 | } else { |
Zachary Turner | c6d54da | 2016-09-09 17:46:17 +0000 | [diff] [blame] | 255 | // For Yaml to PDB, extract from the high level record type, then write it |
| 256 | // to bytes. |
Zachary Turner | 4efa0a4 | 2016-11-08 22:24:53 +0000 | [diff] [blame] | 257 | |
| 258 | // This might be interpreted as a hack, but serializing FieldList |
| 259 | // sub-records requires having access to the same serializer being used by |
| 260 | // the FieldList itself. |
| 261 | Context.ActiveSerializer = &Serializer; |
Zachary Turner | c6d54da | 2016-09-09 17:46:17 +0000 | [diff] [blame] | 262 | Pipeline.addCallbackToPipeline(Context.Dumper); |
| 263 | Pipeline.addCallbackToPipeline(Serializer); |
Zachary Turner | 620961d | 2016-09-14 23:00:02 +0000 | [diff] [blame] | 264 | Pipeline.addCallbackToPipeline(Hasher); |
Zachary Turner | c6d54da | 2016-09-09 17:46:17 +0000 | [diff] [blame] | 265 | } |
| 266 | |
| 267 | codeview::CVTypeVisitor Visitor(Pipeline); |
| 268 | consumeError(Visitor.visitTypeRecord(Obj.Record)); |
Zachary Turner | 4efa0a4 | 2016-11-08 22:24:53 +0000 | [diff] [blame] | 269 | Context.ActiveSerializer = nullptr; |
Zachary Turner | ac5763e | 2016-08-18 16:49:29 +0000 | [diff] [blame] | 270 | } |