summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCExpr.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-01-10 16:47:17 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-01-10 16:47:17 +0000
commitedbb58c577f924dbb69c76f6fbaf421a669fed73 (patch)
tree26e86943cb91d6362fd8fbdd820baec22ae5ac2a /llvm/lib/MC/MCExpr.cpp
parentc07e34ceedaab7e4cdfab5a62820f24168392004 (diff)
downloadbcm5719-llvm-edbb58c577f924dbb69c76f6fbaf421a669fed73.tar.gz
bcm5719-llvm-edbb58c577f924dbb69c76f6fbaf421a669fed73.zip
Remove unnecessary default cases in switches that cover all enum values.
llvm-svn: 147855
Diffstat (limited to 'llvm/lib/MC/MCExpr.cpp')
-rw-r--r--llvm/lib/MC/MCExpr.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp
index 4ebd71a5839..00465153b3c 100644
--- a/llvm/lib/MC/MCExpr.cpp
+++ b/llvm/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>>";
OpenPOWER on IntegriCloud