[llvm] r304249 - Try to fix build.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 15:00:37 PDT 2017


Author: zturner
Date: Tue May 30 17:00:37 2017
New Revision: 304249

URL: http://llvm.org/viewvc/llvm-project?rev=304249&view=rev
Log:
Try to fix build.

Modified:
    llvm/trunk/lib/ObjectYAML/CodeViewYAML.cpp

Modified: llvm/trunk/lib/ObjectYAML/CodeViewYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ObjectYAML/CodeViewYAML.cpp?rev=304249&r1=304248&r2=304249&view=diff
==============================================================================
--- llvm/trunk/lib/ObjectYAML/CodeViewYAML.cpp (original)
+++ llvm/trunk/lib/ObjectYAML/CodeViewYAML.cpp Tue May 30 17:00:37 2017
@@ -406,6 +406,9 @@ void MappingTraits<MemberPointerInfo>::m
   IO.mapRequired("Representation", MPI.Representation);
 }
 
+namespace llvm {
+namespace CodeViewYAML {
+namespace detail {
 template <> void LeafRecordImpl<ModifierRecord>::map(IO &IO) {
   IO.mapRequired("ModifiedType", Record.ModifiedType);
   IO.mapRequired("Modifiers", Record.Modifiers);
@@ -464,6 +467,9 @@ template <> void LeafRecordImpl<ArrayRec
 void LeafRecordImpl<FieldListRecord>::map(IO &IO) {
   IO.mapRequired("FieldList", Members);
 }
+}
+}
+}
 
 namespace {
 class MemberRecordConversionVisitor : public TypeVisitorCallbacks {
@@ -509,6 +515,16 @@ CVType LeafRecordImpl<FieldListRecord>::
   return CVType(Kind, TTB.records().front());
 }
 
+void MappingTraits<OneMethodRecord>::mapping(IO &io, OneMethodRecord &Record) {
+  io.mapRequired("Type", Record.Type);
+  io.mapRequired("Attrs", Record.Attrs.Attrs);
+  io.mapRequired("VFTableOffset", Record.VFTableOffset);
+  io.mapRequired("Name", Record.Name);
+}
+
+namespace llvm {
+namespace CodeViewYAML {
+namespace detail {
 template <> void LeafRecordImpl<ClassRecord>::map(IO &IO) {
   IO.mapRequired("MemberCount", Record.MemberCount);
   IO.mapRequired("Options", Record.Options);
@@ -596,13 +612,6 @@ template <> void LeafRecordImpl<MethodOv
   IO.mapRequired("Methods", Record.Methods);
 }
 
-void MappingTraits<OneMethodRecord>::mapping(IO &io, OneMethodRecord &Record) {
-  io.mapRequired("Type", Record.Type);
-  io.mapRequired("Attrs", Record.Attrs.Attrs);
-  io.mapRequired("VFTableOffset", Record.VFTableOffset);
-  io.mapRequired("Name", Record.Name);
-}
-
 template <> void MemberRecordImpl<OneMethodRecord>::map(IO &IO) {
   MappingTraits<OneMethodRecord>::mapping(IO, Record);
 }
@@ -658,6 +667,9 @@ template <> void MemberRecordImpl<Virtua
 template <> void MemberRecordImpl<ListContinuationRecord>::map(IO &IO) {
   IO.mapRequired("ContinuationIndex", Record.ContinuationIndex);
 }
+}
+}
+}
 
 template <typename T>
 static inline Expected<LeafRecord> fromCodeViewRecordImpl(CVType Type) {
@@ -689,10 +701,18 @@ CVType LeafRecord::toCodeViewRecord(Bump
   return Leaf->toCodeViewRecord(Allocator);
 }
 
+namespace llvm {
+namespace yaml {
 template <> struct MappingTraits<LeafRecordBase> {
   static void mapping(IO &io, LeafRecordBase &Record) { Record.map(io); }
 };
 
+template <> struct MappingTraits<MemberRecordBase> {
+  static void mapping(IO &io, MemberRecordBase &Record) { Record.map(io); }
+};
+}
+}
+
 template <typename ConcreteType>
 static void mapLeafRecordImpl(IO &IO, const char *Class, TypeLeafKind Kind,
                               LeafRecord &Obj) {
@@ -725,10 +745,6 @@ void MappingTraits<LeafRecord>::mapping(
   }
 }
 
-template <> struct MappingTraits<MemberRecordBase> {
-  static void mapping(IO &io, MemberRecordBase &Record) { Record.map(io); }
-};
-
 template <typename ConcreteType>
 static void mapMemberRecordImpl(IO &IO, const char *Class, TypeLeafKind Kind,
                                 MemberRecord &Obj) {




More information about the llvm-commits mailing list