[llvm] r305499 - Fix some more warnings.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 13:03:57 PDT 2017
Author: zturner
Date: Thu Jun 15 15:03:57 2017
New Revision: 305499
URL: http://llvm.org/viewvc/llvm-project?rev=305499&view=rev
Log:
Fix some more warnings.
Modified:
llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.h
llvm/trunk/tools/llvm-pdbutil/MinimalTypeDumper.cpp
llvm/trunk/tools/llvm-pdbutil/RawOutputStyle.cpp
Modified: llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp?rev=305499&r1=305498&r2=305499&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.cpp Thu Jun 15 15:03:57 2017
@@ -172,18 +172,16 @@ static std::string formatThunkOrdinal(Th
RETURN_CASE(ThunkOrdinal, UnknownLoad, "unknown load");
RETURN_CASE(ThunkOrdinal, TrampIncremental, "tramp incremental");
RETURN_CASE(ThunkOrdinal, BranchIsland, "branch island");
- default:
- return formatUnknownEnum(Ordinal);
}
+ return formatUnknownEnum(Ordinal);
}
static std::string formatTrampolineType(TrampolineType Tramp) {
switch (Tramp) {
RETURN_CASE(TrampolineType, TrampIncremental, "tramp incremental");
RETURN_CASE(TrampolineType, BranchIsland, "branch island");
- default:
- return formatUnknownEnum(Tramp);
}
+ return formatUnknownEnum(Tramp);
}
static std::string formatSourceLanguage(SourceLanguage Lang) {
@@ -196,6 +194,7 @@ static std::string formatSourceLanguage(
RETURN_CASE(SourceLanguage, Basic, "basic");
RETURN_CASE(SourceLanguage, Cobol, "cobol");
RETURN_CASE(SourceLanguage, Link, "link");
+ RETURN_CASE(SourceLanguage, VB, "vb");
RETURN_CASE(SourceLanguage, Cvtres, "cvtres");
RETURN_CASE(SourceLanguage, Cvtpgd, "cvtpgd");
RETURN_CASE(SourceLanguage, CSharp, "c#");
@@ -204,9 +203,8 @@ static std::string formatSourceLanguage(
RETURN_CASE(SourceLanguage, JScript, "javascript");
RETURN_CASE(SourceLanguage, MSIL, "msil");
RETURN_CASE(SourceLanguage, HLSL, "hlsl");
- default:
- return formatUnknownEnum(Lang);
}
+ return formatUnknownEnum(Lang);
}
static std::string formatMachineType(CPUType Cpu) {
@@ -270,9 +268,8 @@ static std::string formatMachineType(CPU
RETURN_CASE(CPUType, Thumb, "thumb");
RETURN_CASE(CPUType, ARMNT, "arm nt");
RETURN_CASE(CPUType, D3D11_Shader, "d3d11 shader");
- default:
- return formatUnknownEnum(Cpu);
}
+ return formatUnknownEnum(Cpu);
}
static std::string formatCookieKind(FrameCookieKind Kind) {
@@ -281,9 +278,8 @@ static std::string formatCookieKind(Fram
RETURN_CASE(FrameCookieKind, XorStackPointer, "xor stack ptr");
RETURN_CASE(FrameCookieKind, XorFramePointer, "xor frame ptr");
RETURN_CASE(FrameCookieKind, XorR13, "xor rot13");
- default:
- return formatUnknownEnum(Kind);
}
+ return formatUnknownEnum(Kind);
}
static std::string formatRegisterId(RegisterId Id) {
Modified: llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.h?rev=305499&r1=305498&r2=305499&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.h (original)
+++ llvm/trunk/tools/llvm-pdbutil/MinimalSymbolDumper.h Thu Jun 15 15:03:57 2017
@@ -24,10 +24,10 @@ class MinimalSymbolDumper : public codev
public:
MinimalSymbolDumper(LinePrinter &P, bool RecordBytes,
codeview::LazyRandomTypeCollection &Types)
- : P(P), RecordBytes(RecordBytes), Types(Types) {}
+ : P(P), Types(Types) {}
- virtual Error visitSymbolBegin(codeview::CVSymbol &Record);
- virtual Error visitSymbolEnd(codeview::CVSymbol &Record);
+ Error visitSymbolBegin(codeview::CVSymbol &Record) override;
+ Error visitSymbolEnd(codeview::CVSymbol &Record) override;
#define SYMBOL_RECORD(EnumName, EnumVal, Name) \
virtual Error visitKnownRecord(codeview::CVSymbol &CVR, \
@@ -39,7 +39,6 @@ private:
std::string typeIndex(codeview::TypeIndex TI) const;
LinePrinter &P;
- bool RecordBytes = false;
codeview::LazyRandomTypeCollection &Types;
};
} // namespace pdb
Modified: llvm/trunk/tools/llvm-pdbutil/MinimalTypeDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/MinimalTypeDumper.cpp?rev=305499&r1=305498&r2=305499&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/MinimalTypeDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/MinimalTypeDumper.cpp Thu Jun 15 15:03:57 2017
@@ -103,15 +103,15 @@ static std::string formatCallingConventi
RETURN_CASE(CallingConvention, NearFast, "fastcall");
RETURN_CASE(CallingConvention, NearPascal, "pascal");
RETURN_CASE(CallingConvention, NearStdCall, "stdcall");
+ RETURN_CASE(CallingConvention, NearSysCall, "near syscall");
RETURN_CASE(CallingConvention, NearVector, "vectorcall");
RETURN_CASE(CallingConvention, PpcCall, "ppccall");
+ RETURN_CASE(CallingConvention, SHCall, "shcall");
RETURN_CASE(CallingConvention, SH5Call, "sh5call");
RETURN_CASE(CallingConvention, ThisCall, "thiscall");
RETURN_CASE(CallingConvention, TriCall, "tricall");
- default:
- return formatUnknownEnum(Convention);
}
- return "";
+ return formatUnknownEnum(Convention);
}
static std::string formatPointerMode(PointerMode Mode) {
@@ -121,19 +121,18 @@ static std::string formatPointerMode(Poi
RETURN_CASE(PointerMode, PointerToDataMember, "data member pointer");
RETURN_CASE(PointerMode, PointerToMemberFunction, "member fn pointer");
RETURN_CASE(PointerMode, RValueReference, "rvalue ref");
- default:
- return formatUnknownEnum(Mode);
}
+ return formatUnknownEnum(Mode);
}
static std::string memberAccess(MemberAccess Access) {
switch (Access) {
+ RETURN_CASE(MemberAccess, None, "");
RETURN_CASE(MemberAccess, Private, "private");
RETURN_CASE(MemberAccess, Protected, "protected");
RETURN_CASE(MemberAccess, Public, "public");
- default:
- return formatUnknownEnum(Access);
}
+ return formatUnknownEnum(Access);
}
static std::string methodKind(MethodKind Kind) {
@@ -145,9 +144,8 @@ static std::string methodKind(MethodKind
RETURN_CASE(MethodKind, IntroducingVirtual, "intro virtual");
RETURN_CASE(MethodKind, PureVirtual, "pure virtual");
RETURN_CASE(MethodKind, PureIntroducingVirtual, "pure intro virtual");
- default:
- return formatUnknownEnum(Kind);
}
+ return formatUnknownEnum(Kind);
}
static std::string pointerKind(PointerKind Kind) {
@@ -165,9 +163,8 @@ static std::string pointerKind(PointerKi
RETURN_CASE(PointerKind, Near32, "ptr32");
RETURN_CASE(PointerKind, Far32, "far ptr32");
RETURN_CASE(PointerKind, Near64, "ptr64");
- default:
- return formatUnknownEnum(Kind);
}
+ return formatUnknownEnum(Kind);
}
static std::string memberAttributes(const MemberAttributes &Attrs) {
Modified: llvm/trunk/tools/llvm-pdbutil/RawOutputStyle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/RawOutputStyle.cpp?rev=305499&r1=305498&r2=305499&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/RawOutputStyle.cpp (original)
+++ llvm/trunk/tools/llvm-pdbutil/RawOutputStyle.cpp Thu Jun 15 15:03:57 2017
@@ -608,7 +608,7 @@ Error RawOutputStyle::dumpSectionContrib
class Visitor : public ISectionContribVisitor {
public:
- Visitor(LinePrinter &P, DbiStream &DS) : P(P), DS(DS) {}
+ Visitor(LinePrinter &P) : P(P) {}
void visit(const SectionContrib &SC) override {
P.formatLine(
"SC | mod = {2}, {0}, size = {1}, data crc = {3}, reloc crc = {4}",
@@ -631,10 +631,9 @@ Error RawOutputStyle::dumpSectionContrib
private:
LinePrinter &P;
- DbiStream &DS;
};
- Visitor V(P, Dbi);
+ Visitor V(P);
Dbi.visitSectionContributions(V);
return Error::success();
}
More information about the llvm-commits
mailing list