mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-10 02:25:47 +00:00
Error out with bad optimization level specified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70449 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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.
|
// Determine optimization level. Level -O0 is equivalent to "fast" code gen.
|
||||||
static cl::opt<char>
|
static cl::opt<char>
|
||||||
OptLevel("O",
|
OptLevel("O",
|
||||||
cl::desc("Optimization level. Similar to llvm-gcc -O."),
|
cl::desc("Optimization level. [-O0, -O1, -O2, -Os, or -O3]"),
|
||||||
cl::Prefix,
|
cl::Prefix,
|
||||||
cl::ZeroOrMore,
|
cl::ZeroOrMore,
|
||||||
cl::init(' '));
|
cl::init(' '));
|
||||||
@@ -257,6 +257,8 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
switch (OptLevel) {
|
switch (OptLevel) {
|
||||||
default:
|
default:
|
||||||
|
std::cerr << argv[0] << ": invalid optimization level.\n";
|
||||||
|
return 1;
|
||||||
case ' ': break;
|
case ' ': break;
|
||||||
case '0': OLvl = CodeGenOpt::None; break;
|
case '0': OLvl = CodeGenOpt::None; break;
|
||||||
case '1': OLvl = CodeGenOpt::One; break;
|
case '1': OLvl = CodeGenOpt::One; break;
|
||||||
|
Reference in New Issue
Block a user