diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-01-10 16:47:17 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-01-10 16:47:17 +0000 |
commit | 2bd335470f8939782f3df7f6180282d3825d4f09 (patch) | |
tree | bd27d519e0b2bf705a91e00e029042feee20211d /lib/MC | |
parent | 6c0366cb2588ae49ef6e2f892db2099d41d85391 (diff) | |
download | external_llvm-2bd335470f8939782f3df7f6180282d3825d4f09.zip external_llvm-2bd335470f8939782f3df7f6180282d3825d4f09.tar.gz external_llvm-2bd335470f8939782f3df7f6180282d3825d4f09.tar.bz2 |
Remove unnecessary default cases in switches that cover all enum values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147855 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCAsmStreamer.cpp | 1 | ||||
-rw-r--r-- | lib/MC/MCDisassembler/EDDisassembler.cpp | 2 | ||||
-rw-r--r-- | lib/MC/MCExpr.cpp | 3 | ||||
-rw-r--r-- | lib/MC/MCMachOStreamer.cpp | 2 |
4 files changed, 0 insertions, 8 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index 13b2a39..87516e0 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -340,7 +340,6 @@ void MCAsmStreamer::EmitLabel(MCSymbol *Symbol) { void MCAsmStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) { switch (Flag) { - default: assert(0 && "Invalid flag!"); case MCAF_SyntaxUnified: OS << "\t.syntax unified"; break; case MCAF_SubsectionsViaSymbols: OS << ".subsections_via_symbols"; break; case MCAF_Code16: OS << '\t'<< MAI.getCode16Directive(); break; diff --git a/lib/MC/MCDisassembler/EDDisassembler.cpp b/lib/MC/MCDisassembler/EDDisassembler.cpp index 3540334..8698335 100644 --- a/lib/MC/MCDisassembler/EDDisassembler.cpp +++ b/lib/MC/MCDisassembler/EDDisassembler.cpp @@ -75,8 +75,6 @@ static const char *tripleFromArch(Triple::ArchType arch) { static int getLLVMSyntaxVariant(Triple::ArchType arch, EDDisassembler::AssemblySyntax syntax) { switch (syntax) { - default: - return -1; // Mappings below from X86AsmPrinter.cpp case EDDisassembler::kEDAssemblySyntaxX86ATT: if (arch == Triple::x86 || arch == Triple::x86_64) diff --git a/lib/MC/MCExpr.cpp b/lib/MC/MCExpr.cpp index 4ebd71a..0046515 100644 --- a/lib/MC/MCExpr.cpp +++ b/lib/MC/MCExpr.cpp @@ -70,7 +70,6 @@ void MCExpr::print(raw_ostream &OS) const { case MCExpr::Unary: { const MCUnaryExpr &UE = cast<MCUnaryExpr>(*this); switch (UE.getOpcode()) { - default: assert(0 && "Invalid opcode!"); case MCUnaryExpr::LNot: OS << '!'; break; case MCUnaryExpr::Minus: OS << '-'; break; case MCUnaryExpr::Not: OS << '~'; break; @@ -91,7 +90,6 @@ void MCExpr::print(raw_ostream &OS) const { } switch (BE.getOpcode()) { - default: assert(0 && "Invalid opcode!"); case MCBinaryExpr::Add: // Print "X-42" instead of "X+-42". if (const MCConstantExpr *RHSC = dyn_cast<MCConstantExpr>(BE.getRHS())) { @@ -171,7 +169,6 @@ const MCSymbolRefExpr *MCSymbolRefExpr::Create(StringRef Name, VariantKind Kind, StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) { switch (Kind) { - default: case VK_Invalid: return "<<invalid>>"; case VK_None: return "<<none>>"; diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp index af0f160..09a57cf 100644 --- a/lib/MC/MCMachOStreamer.cpp +++ b/lib/MC/MCMachOStreamer.cpp @@ -150,8 +150,6 @@ void MCMachOStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) { case MCAF_SubsectionsViaSymbols: getAssembler().setSubsectionsViaSymbols(true); return; - default: - llvm_unreachable("invalid assembler flag!"); } } |