mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
CommandLine library cleanup. No longer use getValue/setValue, instead, just treat the commandline
args as the objects they represent and the "right thing" will happen git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -75,7 +75,7 @@ int main(int argc, char **argv) {
|
||||
cl::ParseCommandLineOptions(argc, argv,
|
||||
" llvm .bc -> .bc modular optimizer\n");
|
||||
|
||||
Module *C = ParseBytecodeFile(InputFilename.getValue());
|
||||
Module *C = ParseBytecodeFile(InputFilename);
|
||||
if (C == 0) {
|
||||
cerr << "bytecode didn't read correctly.\n";
|
||||
return 1;
|
||||
@@ -99,11 +99,11 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
ostream *Out = &cout; // Default to printing to stdout...
|
||||
if (OutputFilename.getValue() != "") {
|
||||
Out = new ofstream(OutputFilename.getValue().c_str(),
|
||||
(Force.getValue() ? 0 : ios::noreplace)|ios::out);
|
||||
if (OutputFilename != "") {
|
||||
Out = new ofstream(OutputFilename.c_str(),
|
||||
(Force ? 0 : ios::noreplace)|ios::out);
|
||||
if (!Out->good()) {
|
||||
cerr << "Error opening " << OutputFilename.getValue() << "!\n";
|
||||
cerr << "Error opening " << OutputFilename << "!\n";
|
||||
delete C;
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user