summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ObjectYAML/CodeViewYAML.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-05-30 22:00:37 +0000
committerZachary Turner <zturner@google.com>2017-05-30 22:00:37 +0000
commit9c1ba225a98edd3c2fff8d1dcc00258dd9add5b5 (patch)
treec1bfa33ebd72a343924fa9d63b6775f0f1f7689d /llvm/lib/ObjectYAML/CodeViewYAML.cpp
parentd427383cb883aee50386a247df985bd12133e2db (diff)
downloadbcm5719-llvm-9c1ba225a98edd3c2fff8d1dcc00258dd9add5b5.tar.gz
bcm5719-llvm-9c1ba225a98edd3c2fff8d1dcc00258dd9add5b5.zip
Try to fix build.
llvm-svn: 304249
Diffstat (limited to 'llvm/lib/ObjectYAML/CodeViewYAML.cpp')
-rw-r--r--llvm/lib/ObjectYAML/CodeViewYAML.cpp38
1 files changed, 27 insertions, 11 deletions
diff --git a/llvm/lib/ObjectYAML/CodeViewYAML.cpp b/llvm/lib/ObjectYAML/CodeViewYAML.cpp
index 9e0ab6f9869..f936b5fa5d0 100644
--- a/llvm/lib/ObjectYAML/CodeViewYAML.cpp
+++ b/llvm/lib/ObjectYAML/CodeViewYAML.cpp
@@ -406,6 +406,9 @@ void MappingTraits<MemberPointerInfo>::mapping(IO &IO, MemberPointerInfo &MPI) {
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<ArrayRecord>::map(IO &IO) {
void LeafRecordImpl<FieldListRecord>::map(IO &IO) {
IO.mapRequired("FieldList", Members);
}
+}
+}
+}
namespace {
class MemberRecordConversionVisitor : public TypeVisitorCallbacks {
@@ -509,6 +515,16 @@ CVType LeafRecordImpl<FieldListRecord>::toCodeViewRecord(
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<MethodOverloadListRecord>::map(IO &IO) {
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<VirtualBaseClassRecord>::map(IO &IO) {
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(BumpPtrAllocator &Allocator) const {
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(IO &IO, LeafRecord &Obj) {
}
}
-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) {
OpenPOWER on IntegriCloud