aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llc
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-04-29 23:46:43 +0000
committerBill Wendling <isanbard@gmail.com>2009-04-29 23:46:43 +0000
commit8dc85ddf809b9b987b92da27c0ff7875d6e1f72d (patch)
treef6cd0c22d30d1ba5b4a8d43f26ecf729f5f58ea6 /tools/llc
parentb8cb0bb08c7f9f2dfcdfa5f7d72a4c56a9c93228 (diff)
downloadexternal_llvm-8dc85ddf809b9b987b92da27c0ff7875d6e1f72d.zip
external_llvm-8dc85ddf809b9b987b92da27c0ff7875d6e1f72d.tar.gz
external_llvm-8dc85ddf809b9b987b92da27c0ff7875d6e1f72d.tar.bz2
Error out with bad optimization level specified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70449 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llc')
-rw-r--r--tools/llc/llc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index bb49d32..439c22f 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -58,7 +58,7 @@ static cl::opt<bool> Force("f", cl::desc("Overwrite output files"));
// Determine optimization level. Level -O0 is equivalent to "fast" code gen.
static cl::opt<char>
OptLevel("O",
- cl::desc("Optimization level. Similar to llvm-gcc -O."),
+ cl::desc("Optimization level. [-O0, -O1, -O2, -Os, or -O3]"),
cl::Prefix,
cl::ZeroOrMore,
cl::init(' '));
@@ -257,6 +257,8 @@ int main(int argc, char **argv) {
switch (OptLevel) {
default:
+ std::cerr << argv[0] << ": invalid optimization level.\n";
+ return 1;
case ' ': break;
case '0': OLvl = CodeGenOpt::None; break;
case '1': OLvl = CodeGenOpt::One; break;