[codeview] Remove unused parameter.

Differential Revision: http://reviews.llvm.org/D21433

llvm-svn: 272898
This commit is contained in:
Rui Ueyama 2016-06-16 14:41:22 +00:00
parent b0f613bfc8
commit b9095ae7ee
4 changed files with 47 additions and 69 deletions

View File

@ -43,10 +43,10 @@ public:
/// FIXME: Make the visitor interpret the trailing bytes so that clients don't /// FIXME: Make the visitor interpret the trailing bytes so that clients don't
/// need to. /// need to.
#define TYPE_RECORD(EnumName, EnumVal, Name) \ #define TYPE_RECORD(EnumName, EnumVal, Name) \
void visit##Name(TypeLeafKind LeafType, Name##Record &Record) {} void visit##Name(Name##Record &Record) {}
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#define MEMBER_RECORD(EnumName, EnumVal, Name) \ #define MEMBER_RECORD(EnumName, EnumVal, Name) \
void visit##Name(TypeLeafKind LeafType, Name##Record &Record) {} void visit##Name(Name##Record &Record) {}
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#include "TypeRecords.def" #include "TypeRecords.def"
@ -68,7 +68,7 @@ public:
auto Result = Name##Record::deserialize(RK, LeafData); \ auto Result = Name##Record::deserialize(RK, LeafData); \
if (Result.getError()) \ if (Result.getError()) \
return parseError(); \ return parseError(); \
DerivedThis->visit##Name(Record.Type, *Result); \ DerivedThis->visit##Name(*Result); \
break; \ break; \
} }
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) \ #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) \
@ -133,7 +133,7 @@ public:
auto Result = Name##Record::deserialize(RK, FieldData); \ auto Result = Name##Record::deserialize(RK, FieldData); \
if (Result.getError()) \ if (Result.getError()) \
return parseError(); \ return parseError(); \
DerivedThis->visit##Name(Leaf, *Result); \ DerivedThis->visit##Name(*Result); \
break; \ break; \
} }
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) \ #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) \

View File

@ -201,10 +201,10 @@ public:
/// CVTypeVisitor overrides. /// CVTypeVisitor overrides.
#define TYPE_RECORD(EnumName, EnumVal, Name) \ #define TYPE_RECORD(EnumName, EnumVal, Name) \
void visit##Name(TypeLeafKind LeafType, Name##Record &Record); void visit##Name(Name##Record &Record);
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#define MEMBER_RECORD(EnumName, EnumVal, Name) \ #define MEMBER_RECORD(EnumName, EnumVal, Name) \
void visit##Name(TypeLeafKind LeafType, Name##Record &Record); void visit##Name(Name##Record &Record);
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#include "llvm/DebugInfo/CodeView/TypeRecords.def" #include "llvm/DebugInfo/CodeView/TypeRecords.def"
@ -274,15 +274,14 @@ void CVTypeDumperImpl::visitTypeEnd(TypeLeafKind Leaf,
W.startLine() << "}\n"; W.startLine() << "}\n";
} }
void CVTypeDumperImpl::visitStringId(TypeLeafKind Leaf, void CVTypeDumperImpl::visitStringId(StringIdRecord &String) {
StringIdRecord &String) {
printTypeIndex("Id", String.getId()); printTypeIndex("Id", String.getId());
W.printString("StringData", String.getString()); W.printString("StringData", String.getString());
// Put this in CVUDTNames so it gets printed with LF_UDT_SRC_LINE. // Put this in CVUDTNames so it gets printed with LF_UDT_SRC_LINE.
Name = String.getString(); Name = String.getString();
} }
void CVTypeDumperImpl::visitArgList(TypeLeafKind Leaf, ArgListRecord &Args) { void CVTypeDumperImpl::visitArgList(ArgListRecord &Args) {
auto Indices = Args.getIndices(); auto Indices = Args.getIndices();
uint32_t Size = Indices.size(); uint32_t Size = Indices.size();
W.printNumber("NumArgs", Size); W.printNumber("NumArgs", Size);
@ -299,7 +298,7 @@ void CVTypeDumperImpl::visitArgList(TypeLeafKind Leaf, ArgListRecord &Args) {
Name = CVTD.saveName(TypeName); Name = CVTD.saveName(TypeName);
} }
void CVTypeDumperImpl::visitClass(TypeLeafKind Leaf, ClassRecord &Class) { void CVTypeDumperImpl::visitClass(ClassRecord &Class) {
uint16_t Props = static_cast<uint16_t>(Class.getOptions()); uint16_t Props = static_cast<uint16_t>(Class.getOptions());
W.printNumber("MemberCount", Class.getMemberCount()); W.printNumber("MemberCount", Class.getMemberCount());
W.printFlags("Properties", Props, makeArrayRef(ClassOptionNames)); W.printFlags("Properties", Props, makeArrayRef(ClassOptionNames));
@ -313,7 +312,7 @@ void CVTypeDumperImpl::visitClass(TypeLeafKind Leaf, ClassRecord &Class) {
Name = Class.getName(); Name = Class.getName();
} }
void CVTypeDumperImpl::visitUnion(TypeLeafKind Leaf, UnionRecord &Union) { void CVTypeDumperImpl::visitUnion(UnionRecord &Union) {
uint16_t Props = static_cast<uint16_t>(Union.getOptions()); uint16_t Props = static_cast<uint16_t>(Union.getOptions());
W.printNumber("MemberCount", Union.getMemberCount()); W.printNumber("MemberCount", Union.getMemberCount());
W.printFlags("Properties", Props, makeArrayRef(ClassOptionNames)); W.printFlags("Properties", Props, makeArrayRef(ClassOptionNames));
@ -325,7 +324,7 @@ void CVTypeDumperImpl::visitUnion(TypeLeafKind Leaf, UnionRecord &Union) {
Name = Union.getName(); Name = Union.getName();
} }
void CVTypeDumperImpl::visitEnum(TypeLeafKind Leaf, EnumRecord &Enum) { void CVTypeDumperImpl::visitEnum(EnumRecord &Enum) {
W.printNumber("NumEnumerators", Enum.getMemberCount()); W.printNumber("NumEnumerators", Enum.getMemberCount());
W.printFlags("Properties", uint16_t(Enum.getOptions()), W.printFlags("Properties", uint16_t(Enum.getOptions()),
makeArrayRef(ClassOptionNames)); makeArrayRef(ClassOptionNames));
@ -335,7 +334,7 @@ void CVTypeDumperImpl::visitEnum(TypeLeafKind Leaf, EnumRecord &Enum) {
Name = Enum.getName(); Name = Enum.getName();
} }
void CVTypeDumperImpl::visitArray(TypeLeafKind Leaf, ArrayRecord &AT) { void CVTypeDumperImpl::visitArray(ArrayRecord &AT) {
printTypeIndex("ElementType", AT.getElementType()); printTypeIndex("ElementType", AT.getElementType());
printTypeIndex("IndexType", AT.getIndexType()); printTypeIndex("IndexType", AT.getIndexType());
W.printNumber("SizeOf", AT.getSize()); W.printNumber("SizeOf", AT.getSize());
@ -343,7 +342,7 @@ void CVTypeDumperImpl::visitArray(TypeLeafKind Leaf, ArrayRecord &AT) {
Name = AT.getName(); Name = AT.getName();
} }
void CVTypeDumperImpl::visitVFTable(TypeLeafKind Leaf, VFTableRecord &VFT) { void CVTypeDumperImpl::visitVFTable(VFTableRecord &VFT) {
printTypeIndex("CompleteClass", VFT.getCompleteClass()); printTypeIndex("CompleteClass", VFT.getCompleteClass());
printTypeIndex("OverriddenVFTable", VFT.getOverriddenVTable()); printTypeIndex("OverriddenVFTable", VFT.getOverriddenVTable());
W.printHex("VFPtrOffset", VFT.getVFPtrOffset()); W.printHex("VFPtrOffset", VFT.getVFPtrOffset());
@ -353,16 +352,14 @@ void CVTypeDumperImpl::visitVFTable(TypeLeafKind Leaf, VFTableRecord &VFT) {
Name = VFT.getName(); Name = VFT.getName();
} }
void CVTypeDumperImpl::visitMemberFuncId(TypeLeafKind Leaf, void CVTypeDumperImpl::visitMemberFuncId(MemberFuncIdRecord &Id) {
MemberFuncIdRecord &Id) {
printTypeIndex("ClassType", Id.getClassType()); printTypeIndex("ClassType", Id.getClassType());
printTypeIndex("FunctionType", Id.getFunctionType()); printTypeIndex("FunctionType", Id.getFunctionType());
W.printString("Name", Id.getName()); W.printString("Name", Id.getName());
Name = Id.getName(); Name = Id.getName();
} }
void CVTypeDumperImpl::visitProcedure(TypeLeafKind Leaf, void CVTypeDumperImpl::visitProcedure(ProcedureRecord &Proc) {
ProcedureRecord &Proc) {
printTypeIndex("ReturnType", Proc.getReturnType()); printTypeIndex("ReturnType", Proc.getReturnType());
W.printEnum("CallingConvention", uint8_t(Proc.getCallConv()), W.printEnum("CallingConvention", uint8_t(Proc.getCallConv()),
makeArrayRef(CallingConventions)); makeArrayRef(CallingConventions));
@ -379,8 +376,7 @@ void CVTypeDumperImpl::visitProcedure(TypeLeafKind Leaf,
Name = CVTD.saveName(TypeName); Name = CVTD.saveName(TypeName);
} }
void CVTypeDumperImpl::visitMemberFunction(TypeLeafKind Leaf, void CVTypeDumperImpl::visitMemberFunction(MemberFunctionRecord &MF) {
MemberFunctionRecord &MF) {
printTypeIndex("ReturnType", MF.getReturnType()); printTypeIndex("ReturnType", MF.getReturnType());
printTypeIndex("ClassType", MF.getClassType()); printTypeIndex("ClassType", MF.getClassType());
printTypeIndex("ThisType", MF.getThisType()); printTypeIndex("ThisType", MF.getThisType());
@ -404,7 +400,7 @@ void CVTypeDumperImpl::visitMemberFunction(TypeLeafKind Leaf,
} }
void CVTypeDumperImpl::visitMethodOverloadList( void CVTypeDumperImpl::visitMethodOverloadList(
TypeLeafKind Leaf, MethodOverloadListRecord &MethodList) { MethodOverloadListRecord &MethodList) {
for (auto &M : MethodList.getMethods()) { for (auto &M : MethodList.getMethods()) {
ListScope S(W, "Method"); ListScope S(W, "Method");
printMemberAttributes(M.getAccess(), M.getKind(), M.getOptions()); printMemberAttributes(M.getAccess(), M.getKind(), M.getOptions());
@ -414,22 +410,21 @@ void CVTypeDumperImpl::visitMethodOverloadList(
} }
} }
void CVTypeDumperImpl::visitFuncId(TypeLeafKind Leaf, FuncIdRecord &Func) { void CVTypeDumperImpl::visitFuncId(FuncIdRecord &Func) {
printTypeIndex("ParentScope", Func.getParentScope()); printTypeIndex("ParentScope", Func.getParentScope());
printTypeIndex("FunctionType", Func.getFunctionType()); printTypeIndex("FunctionType", Func.getFunctionType());
W.printString("Name", Func.getName()); W.printString("Name", Func.getName());
Name = Func.getName(); Name = Func.getName();
} }
void CVTypeDumperImpl::visitTypeServer2(TypeLeafKind Leaf, void CVTypeDumperImpl::visitTypeServer2(TypeServer2Record &TS) {
TypeServer2Record &TS) {
W.printBinary("Signature", TS.getGuid()); W.printBinary("Signature", TS.getGuid());
W.printNumber("Age", TS.getAge()); W.printNumber("Age", TS.getAge());
W.printString("Name", TS.getName()); W.printString("Name", TS.getName());
Name = TS.getName(); Name = TS.getName();
} }
void CVTypeDumperImpl::visitPointer(TypeLeafKind Leaf, PointerRecord &Ptr) { void CVTypeDumperImpl::visitPointer(PointerRecord &Ptr) {
printTypeIndex("PointeeType", Ptr.getReferentType()); printTypeIndex("PointeeType", Ptr.getReferentType());
W.printHex("PointerAttributes", uint32_t(Ptr.getOptions())); W.printHex("PointerAttributes", uint32_t(Ptr.getOptions()));
W.printEnum("PtrType", unsigned(Ptr.getPointerKind()), W.printEnum("PtrType", unsigned(Ptr.getPointerKind()),
@ -478,7 +473,7 @@ void CVTypeDumperImpl::visitPointer(TypeLeafKind Leaf, PointerRecord &Ptr) {
} }
} }
void CVTypeDumperImpl::visitModifier(TypeLeafKind Leaf, ModifierRecord &Mod) { void CVTypeDumperImpl::visitModifier(ModifierRecord &Mod) {
uint16_t Mods = static_cast<uint16_t>(Mod.getModifiers()); uint16_t Mods = static_cast<uint16_t>(Mod.getModifiers());
printTypeIndex("ModifiedType", Mod.getModifiedType()); printTypeIndex("ModifiedType", Mod.getModifiedType());
W.printFlags("Modifiers", Mods, makeArrayRef(TypeModifierNames)); W.printFlags("Modifiers", Mods, makeArrayRef(TypeModifierNames));
@ -495,35 +490,30 @@ void CVTypeDumperImpl::visitModifier(TypeLeafKind Leaf, ModifierRecord &Mod) {
Name = CVTD.saveName(TypeName); Name = CVTD.saveName(TypeName);
} }
void CVTypeDumperImpl::visitBitField(TypeLeafKind Leaf, void CVTypeDumperImpl::visitBitField(BitFieldRecord &BitField) {
BitFieldRecord &BitField) {
printTypeIndex("Type", BitField.getType()); printTypeIndex("Type", BitField.getType());
W.printNumber("BitSize", BitField.getBitSize()); W.printNumber("BitSize", BitField.getBitSize());
W.printNumber("BitOffset", BitField.getBitOffset()); W.printNumber("BitOffset", BitField.getBitOffset());
} }
void CVTypeDumperImpl::visitVFTableShape(TypeLeafKind Leaf, void CVTypeDumperImpl::visitVFTableShape(VFTableShapeRecord &Shape) {
VFTableShapeRecord &Shape) {
W.printNumber("VFEntryCount", Shape.getEntryCount()); W.printNumber("VFEntryCount", Shape.getEntryCount());
} }
void CVTypeDumperImpl::visitUdtSourceLine(TypeLeafKind Leaf, void CVTypeDumperImpl::visitUdtSourceLine(UdtSourceLineRecord &Line) {
UdtSourceLineRecord &Line) {
printTypeIndex("UDT", Line.getUDT()); printTypeIndex("UDT", Line.getUDT());
printTypeIndex("SourceFile", Line.getSourceFile()); printTypeIndex("SourceFile", Line.getSourceFile());
W.printNumber("LineNumber", Line.getLineNumber()); W.printNumber("LineNumber", Line.getLineNumber());
} }
void CVTypeDumperImpl::visitUdtModSourceLine(TypeLeafKind Leaf, void CVTypeDumperImpl::visitUdtModSourceLine(UdtModSourceLineRecord &Line) {
UdtModSourceLineRecord &Line) {
printTypeIndex("UDT", Line.getUDT()); printTypeIndex("UDT", Line.getUDT());
printTypeIndex("SourceFile", Line.getSourceFile()); printTypeIndex("SourceFile", Line.getSourceFile());
W.printNumber("LineNumber", Line.getLineNumber()); W.printNumber("LineNumber", Line.getLineNumber());
W.printNumber("Module", Line.getModule()); W.printNumber("Module", Line.getModule());
} }
void CVTypeDumperImpl::visitBuildInfo(TypeLeafKind Leaf, void CVTypeDumperImpl::visitBuildInfo(BuildInfoRecord &Args) {
BuildInfoRecord &Args) {
W.printNumber("NumArgs", static_cast<uint32_t>(Args.getArgs().size())); W.printNumber("NumArgs", static_cast<uint32_t>(Args.getArgs().size()));
ListScope Arguments(W, "Arguments"); ListScope Arguments(W, "Arguments");
@ -562,16 +552,14 @@ void CVTypeDumperImpl::visitUnknownType(TypeLeafKind Leaf,
W.printNumber("Length", uint32_t(RecordData.size())); W.printNumber("Length", uint32_t(RecordData.size()));
} }
void CVTypeDumperImpl::visitNestedType(TypeLeafKind Leaf, void CVTypeDumperImpl::visitNestedType(NestedTypeRecord &Nested) {
NestedTypeRecord &Nested) {
DictScope S(W, "NestedType"); DictScope S(W, "NestedType");
printTypeIndex("Type", Nested.getNestedType()); printTypeIndex("Type", Nested.getNestedType());
W.printString("Name", Nested.getName()); W.printString("Name", Nested.getName());
Name = Nested.getName(); Name = Nested.getName();
} }
void CVTypeDumperImpl::visitOneMethod(TypeLeafKind Leaf, void CVTypeDumperImpl::visitOneMethod(OneMethodRecord &Method) {
OneMethodRecord &Method) {
DictScope S(W, "OneMethod"); DictScope S(W, "OneMethod");
MethodKind K = Method.getKind(); MethodKind K = Method.getKind();
printMemberAttributes(Method.getAccess(), K, Method.getOptions()); printMemberAttributes(Method.getAccess(), K, Method.getOptions());
@ -583,8 +571,7 @@ void CVTypeDumperImpl::visitOneMethod(TypeLeafKind Leaf,
Name = Method.getName(); Name = Method.getName();
} }
void CVTypeDumperImpl::visitOverloadedMethod(TypeLeafKind Leaf, void CVTypeDumperImpl::visitOverloadedMethod(OverloadedMethodRecord &Method) {
OverloadedMethodRecord &Method) {
DictScope S(W, "OverloadedMethod"); DictScope S(W, "OverloadedMethod");
W.printHex("MethodCount", Method.getNumOverloads()); W.printHex("MethodCount", Method.getNumOverloads());
printTypeIndex("MethodListIndex", Method.getMethodList()); printTypeIndex("MethodListIndex", Method.getMethodList());
@ -592,8 +579,7 @@ void CVTypeDumperImpl::visitOverloadedMethod(TypeLeafKind Leaf,
Name = Method.getName(); Name = Method.getName();
} }
void CVTypeDumperImpl::visitDataMember(TypeLeafKind Leaf, void CVTypeDumperImpl::visitDataMember(DataMemberRecord &Field) {
DataMemberRecord &Field) {
DictScope S(W, "DataMember"); DictScope S(W, "DataMember");
printMemberAttributes(Field.getAccess(), MethodKind::Vanilla, printMemberAttributes(Field.getAccess(), MethodKind::Vanilla,
MethodOptions::None); MethodOptions::None);
@ -603,8 +589,7 @@ void CVTypeDumperImpl::visitDataMember(TypeLeafKind Leaf,
Name = Field.getName(); Name = Field.getName();
} }
void CVTypeDumperImpl::visitStaticDataMember(TypeLeafKind Leaf, void CVTypeDumperImpl::visitStaticDataMember(StaticDataMemberRecord &Field) {
StaticDataMemberRecord &Field) {
DictScope S(W, "StaticDataMember"); DictScope S(W, "StaticDataMember");
printMemberAttributes(Field.getAccess(), MethodKind::Vanilla, printMemberAttributes(Field.getAccess(), MethodKind::Vanilla,
MethodOptions::None); MethodOptions::None);
@ -613,13 +598,12 @@ void CVTypeDumperImpl::visitStaticDataMember(TypeLeafKind Leaf,
Name = Field.getName(); Name = Field.getName();
} }
void CVTypeDumperImpl::visitVFPtr(TypeLeafKind Leaf, VFPtrRecord &VFTable) { void CVTypeDumperImpl::visitVFPtr(VFPtrRecord &VFTable) {
DictScope S(W, "VFPtr"); DictScope S(W, "VFPtr");
printTypeIndex("Type", VFTable.getType()); printTypeIndex("Type", VFTable.getType());
} }
void CVTypeDumperImpl::visitEnumerator(TypeLeafKind Leaf, void CVTypeDumperImpl::visitEnumerator(EnumeratorRecord &Enum) {
EnumeratorRecord &Enum) {
DictScope S(W, "Enumerator"); DictScope S(W, "Enumerator");
printMemberAttributes(Enum.getAccess(), MethodKind::Vanilla, printMemberAttributes(Enum.getAccess(), MethodKind::Vanilla,
MethodOptions::None); MethodOptions::None);
@ -628,8 +612,7 @@ void CVTypeDumperImpl::visitEnumerator(TypeLeafKind Leaf,
Name = Enum.getName(); Name = Enum.getName();
} }
void CVTypeDumperImpl::visitBaseClass(TypeLeafKind Leaf, void CVTypeDumperImpl::visitBaseClass(BaseClassRecord &Base) {
BaseClassRecord &Base) {
DictScope S(W, "BaseClass"); DictScope S(W, "BaseClass");
printMemberAttributes(Base.getAccess(), MethodKind::Vanilla, printMemberAttributes(Base.getAccess(), MethodKind::Vanilla,
MethodOptions::None); MethodOptions::None);
@ -637,8 +620,7 @@ void CVTypeDumperImpl::visitBaseClass(TypeLeafKind Leaf,
W.printHex("BaseOffset", Base.getBaseOffset()); W.printHex("BaseOffset", Base.getBaseOffset());
} }
void CVTypeDumperImpl::visitVirtualBaseClass(TypeLeafKind Leaf, void CVTypeDumperImpl::visitVirtualBaseClass(VirtualBaseClassRecord &Base) {
VirtualBaseClassRecord &Base) {
DictScope S(W, "VirtualBaseClass"); DictScope S(W, "VirtualBaseClass");
printMemberAttributes(Base.getAccess(), MethodKind::Vanilla, printMemberAttributes(Base.getAccess(), MethodKind::Vanilla,
MethodOptions::None); MethodOptions::None);

View File

@ -57,10 +57,10 @@ public:
/// CVTypeVisitor overrides. /// CVTypeVisitor overrides.
#define TYPE_RECORD(EnumName, EnumVal, Name) \ #define TYPE_RECORD(EnumName, EnumVal, Name) \
void visit##Name(TypeLeafKind LeafType, Name##Record &Record); void visit##Name(Name##Record &Record);
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#define MEMBER_RECORD(EnumName, EnumVal, Name) \ #define MEMBER_RECORD(EnumName, EnumVal, Name) \
void visit##Name(TypeLeafKind LeafType, Name##Record &Record); void visit##Name(Name##Record &Record);
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#include "llvm/DebugInfo/CodeView/TypeRecords.def" #include "llvm/DebugInfo/CodeView/TypeRecords.def"
@ -109,15 +109,13 @@ void TypeStreamMerger::visitFieldList(TypeLeafKind Leaf,
} }
#define TYPE_RECORD(EnumName, EnumVal, Name) \ #define TYPE_RECORD(EnumName, EnumVal, Name) \
void TypeStreamMerger::visit##Name(TypeLeafKind LeafType, \ void TypeStreamMerger::visit##Name(Name##Record &Record) { \
Name##Record &Record) { \
FoundBadTypeIndex |= !Record.remapTypeIndices(IndexMap); \ FoundBadTypeIndex |= !Record.remapTypeIndices(IndexMap); \
IndexMap.push_back(DestStream.write##Name(Record)); \ IndexMap.push_back(DestStream.write##Name(Record)); \
} }
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
#define MEMBER_RECORD(EnumName, EnumVal, Name) \ #define MEMBER_RECORD(EnumName, EnumVal, Name) \
void TypeStreamMerger::visit##Name(TypeLeafKind LeafType, \ void TypeStreamMerger::visit##Name(Name##Record &Record) { \
Name##Record &Record) { \
FoundBadTypeIndex |= !Record.remapTypeIndices(IndexMap); \ FoundBadTypeIndex |= !Record.remapTypeIndices(IndexMap); \
FieldBuilder.write##Name(Record); \ FieldBuilder.write##Name(Record); \
} }

View File

@ -90,19 +90,17 @@ public:
uint32_t NumHashBuckets) uint32_t NumHashBuckets)
: HashValues(HashValues), NumHashBuckets(NumHashBuckets) {} : HashValues(HashValues), NumHashBuckets(NumHashBuckets) {}
void visitUdtSourceLine(TypeLeafKind, UdtSourceLineRecord &Rec) { void visitUdtSourceLine(UdtSourceLineRecord &Rec) { verifySourceLine(Rec); }
void visitUdtModSourceLine(UdtModSourceLineRecord &Rec) {
verifySourceLine(Rec); verifySourceLine(Rec);
} }
void visitUdtModSourceLine(TypeLeafKind, UdtModSourceLineRecord &Rec) { void visitClass(ClassRecord &Rec) { verify(Rec); }
verifySourceLine(Rec); void visitEnum(EnumRecord &Rec) { verify(Rec); }
} void visitInterface(ClassRecord &Rec) { verify(Rec); }
void visitStruct(ClassRecord &Rec) { verify(Rec); }
void visitClass(TypeLeafKind, ClassRecord &Rec) { verify(Rec); } void visitUnion(UnionRecord &Rec) { verify(Rec); }
void visitEnum(TypeLeafKind, EnumRecord &Rec) { verify(Rec); }
void visitInterface(TypeLeafKind, ClassRecord &Rec) { verify(Rec); }
void visitStruct(TypeLeafKind, ClassRecord &Rec) { verify(Rec); }
void visitUnion(TypeLeafKind, UnionRecord &Rec) { verify(Rec); }
void visitTypeEnd(TypeLeafKind Leaf, ArrayRef<uint8_t> RecordData) { void visitTypeEnd(TypeLeafKind Leaf, ArrayRef<uint8_t> RecordData) {
++Index; ++Index;