[llvm] r272898 - [codeview] Remove unused parameter.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 07:41:22 PDT 2016


Author: ruiu
Date: Thu Jun 16 09:41:22 2016
New Revision: 272898

URL: http://llvm.org/viewvc/llvm-project?rev=272898&view=rev
Log:
[codeview] Remove unused parameter.

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

Modified:
    llvm/trunk/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h
    llvm/trunk/lib/DebugInfo/CodeView/TypeDumper.cpp
    llvm/trunk/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
    llvm/trunk/lib/DebugInfo/PDB/Raw/TpiStream.cpp

Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h?rev=272898&r1=272897&r2=272898&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h Thu Jun 16 09:41:22 2016
@@ -43,10 +43,10 @@ public:
   /// FIXME: Make the visitor interpret the trailing bytes so that clients don't
   /// need to.
 #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 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)
 #include "TypeRecords.def"
 
@@ -68,7 +68,7 @@ public:
     auto Result = Name##Record::deserialize(RK, LeafData);                     \
     if (Result.getError())                                                     \
       return parseError();                                                     \
-    DerivedThis->visit##Name(Record.Type, *Result);                            \
+    DerivedThis->visit##Name(*Result);                                         \
     break;                                                                     \
   }
 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)                  \
@@ -133,7 +133,7 @@ public:
     auto Result = Name##Record::deserialize(RK, FieldData);                    \
     if (Result.getError())                                                     \
       return parseError();                                                     \
-    DerivedThis->visit##Name(Leaf, *Result);                                   \
+    DerivedThis->visit##Name(*Result);                                         \
     break;                                                                     \
   }
 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)                \

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

Modified: llvm/trunk/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/CodeView/TypeStreamMerger.cpp?rev=272898&r1=272897&r2=272898&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/CodeView/TypeStreamMerger.cpp (original)
+++ llvm/trunk/lib/DebugInfo/CodeView/TypeStreamMerger.cpp Thu Jun 16 09:41:22 2016
@@ -57,10 +57,10 @@ public:
 
   /// CVTypeVisitor overrides.
 #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 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)
 #include "llvm/DebugInfo/CodeView/TypeRecords.def"
 
@@ -109,15 +109,13 @@ void TypeStreamMerger::visitFieldList(Ty
 }
 
 #define TYPE_RECORD(EnumName, EnumVal, Name)                                   \
-  void TypeStreamMerger::visit##Name(TypeLeafKind LeafType,                    \
-                                     Name##Record &Record) {                   \
+  void TypeStreamMerger::visit##Name(Name##Record &Record) {                   \
     FoundBadTypeIndex |= !Record.remapTypeIndices(IndexMap);                   \
     IndexMap.push_back(DestStream.write##Name(Record));                        \
   }
 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
 #define MEMBER_RECORD(EnumName, EnumVal, Name)                                 \
-  void TypeStreamMerger::visit##Name(TypeLeafKind LeafType,                    \
-                                     Name##Record &Record) {                   \
+  void TypeStreamMerger::visit##Name(Name##Record &Record) {                   \
     FoundBadTypeIndex |= !Record.remapTypeIndices(IndexMap);                   \
     FieldBuilder.write##Name(Record);                                          \
   }

Modified: llvm/trunk/lib/DebugInfo/PDB/Raw/TpiStream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Raw/TpiStream.cpp?rev=272898&r1=272897&r2=272898&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Raw/TpiStream.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Raw/TpiStream.cpp Thu Jun 16 09:41:22 2016
@@ -90,19 +90,17 @@ public:
                   uint32_t NumHashBuckets)
       : HashValues(HashValues), NumHashBuckets(NumHashBuckets) {}
 
-  void visitUdtSourceLine(TypeLeafKind, UdtSourceLineRecord &Rec) {
-    verifySourceLine(Rec);
-  }
+  void visitUdtSourceLine(UdtSourceLineRecord &Rec) { verifySourceLine(Rec); }
 
-  void visitUdtModSourceLine(TypeLeafKind, UdtModSourceLineRecord &Rec) {
+  void visitUdtModSourceLine(UdtModSourceLineRecord &Rec) {
     verifySourceLine(Rec);
   }
 
-  void visitClass(TypeLeafKind, ClassRecord &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 visitClass(ClassRecord &Rec) { verify(Rec); }
+  void visitEnum(EnumRecord &Rec) { verify(Rec); }
+  void visitInterface(ClassRecord &Rec) { verify(Rec); }
+  void visitStruct(ClassRecord &Rec) { verify(Rec); }
+  void visitUnion(UnionRecord &Rec) { verify(Rec); }
 
   void visitTypeEnd(TypeLeafKind Leaf, ArrayRef<uint8_t> RecordData) {
     ++Index;




More information about the llvm-commits mailing list