static bool mustQuote(StringRef Scalar) { return false; }
};
-void MappingTraits<CVType>::mapping(IO &IO, CVType &Record) {
+void MappingContextTraits<CVType, YamlTypeDumperCallbacks>::mapping(
+ IO &IO, CVType &Record, YamlTypeDumperCallbacks &Dumper) {
if (IO.outputting()) {
codeview::TypeDeserializer Deserializer;
- codeview::yaml::YamlTypeDumperCallbacks Callbacks(IO);
codeview::TypeVisitorCallbackPipeline Pipeline;
Pipeline.addCallbackToPipeline(Deserializer);
- Pipeline.addCallbackToPipeline(Callbacks);
+ Pipeline.addCallbackToPipeline(Dumper);
codeview::CVTypeVisitor Visitor(Pipeline);
consumeError(Visitor.visitTypeRecord(Record));
}
}
-void MappingTraits<FieldListRecord>::mapping(IO &IO,
- FieldListRecord &FieldList) {
+void MappingContextTraits<FieldListRecord, YamlTypeDumperCallbacks>::mapping(
+ IO &IO, FieldListRecord &FieldList, YamlTypeDumperCallbacks &Dumper) {
if (IO.outputting()) {
- codeview::yaml::YamlTypeDumperCallbacks Callbacks(IO);
codeview::TypeDeserializer Deserializer;
codeview::TypeVisitorCallbackPipeline Pipeline;
Pipeline.addCallbackToPipeline(Deserializer);
- Pipeline.addCallbackToPipeline(Callbacks);
+ Pipeline.addCallbackToPipeline(Dumper);
codeview::CVTypeVisitor Visitor(Pipeline);
consumeError(Visitor.visitFieldListMemberStream(FieldList.Data));
static void mapping(IO &IO, codeview::MemberPointerInfo &Obj);
};
-template <> struct MappingTraits<codeview::CVType> {
- static void mapping(IO &IO, codeview::CVType &Obj);
+template <>
+struct MappingContextTraits<codeview::CVType,
+ codeview::yaml::YamlTypeDumperCallbacks> {
+ static void mapping(IO &IO, codeview::CVType &Obj,
+ codeview::yaml::YamlTypeDumperCallbacks &Context);
};
template <> struct ScalarEnumerationTraits<codeview::TypeLeafKind> {
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#include "llvm/DebugInfo/CodeView/TypeRecords.def"
+
+template <>
+struct MappingContextTraits<codeview::FieldListRecord,
+ codeview::yaml::YamlTypeDumperCallbacks> {
+ static void mapping(IO &IO, codeview::FieldListRecord &Record,
+ codeview::yaml::YamlTypeDumperCallbacks &Context);
+};
}
}