summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-01-16 23:24:27 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-01-16 23:24:27 +0000
commit486df738c305eeb148d557a94777f2c04aa72d40 (patch)
treebc1953ce53be6eb05f8602c42ed18e93473437c1 /llvm/lib/Support
parentb1691ccaaa50f432f24d67759d9e78052f34cacd (diff)
downloadbcm5719-llvm-486df738c305eeb148d557a94777f2c04aa72d40.tar.gz
bcm5719-llvm-486df738c305eeb148d557a94777f2c04aa72d40.zip
Removing unused default switch cases in switches over enums that already account for all enumeration values explicitly.
(This time I believe I've checked all the -Wreturn-type warnings from GCC & added the couple of llvm_unreachables necessary to silence them. If I've missed any, I'll happily fix them as soon as I know about them) llvm-svn: 148262
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/CommandLine.cpp6
-rw-r--r--llvm/lib/Support/SourceMgr.cpp1
2 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index ce9344954bc..d1f9fad8dd4 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -292,12 +292,6 @@ static inline bool ProvideOption(Option *Handler, StringRef ArgName,
break;
case ValueOptional:
break;
-
- default:
- errs() << ProgramName
- << ": Bad ValueMask flag! CommandLine usage error:"
- << Handler->getValueExpectedFlag() << "\n";
- llvm_unreachable(0);
}
// If this isn't a multi-arg option, just run the handler.
diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp
index 5a6090d05e3..bbe36b260b9 100644
--- a/llvm/lib/Support/SourceMgr.cpp
+++ b/llvm/lib/Support/SourceMgr.cpp
@@ -244,7 +244,6 @@ void SMDiagnostic::print(const char *ProgName, raw_ostream &S) const {
}
switch (Kind) {
- default: assert(0 && "Unknown diagnostic kind");
case SourceMgr::DK_Error: S << "error: "; break;
case SourceMgr::DK_Warning: S << "warning: "; break;
case SourceMgr::DK_Note: S << "note: "; break;
OpenPOWER on IntegriCloud