From 6c8103f7ddb734d128739a463bcd0667d73c62aa Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 22 May 2003 20:13:16 +0000 Subject: Kill using declarations git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6292 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/opt/opt.cpp | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'tools/opt') diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 0127c53..743bfb8 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -20,9 +20,6 @@ #include #include -using std::cerr; -using std::string; - // The OptimizationList is automatically populated with registered Passes by the // PassNameParser. @@ -34,10 +31,10 @@ OptimizationList(cl::desc("Optimizations available:")); // Other command line options... // -static cl::opt +static cl::opt InputFilename(cl::Positional, cl::desc(""), cl::init("-")); -static cl::opt +static cl::opt OutputFilename("o", cl::desc("Override output filename"), cl::value_desc("filename")); @@ -78,11 +75,11 @@ int main(int argc, char **argv) { // Load the input module... std::auto_ptr M(ParseBytecodeFile(InputFilename, &ErrorMessage)); if (M.get() == 0) { - cerr << argv[0] << ": "; + std::cerr << argv[0] << ": "; if (ErrorMessage.size()) - cerr << ErrorMessage << "\n"; + std::cerr << ErrorMessage << "\n"; else - cerr << "bytecode didn't read correctly.\n"; + std::cerr << "bytecode didn't read correctly.\n"; return 1; } @@ -91,15 +88,15 @@ int main(int argc, char **argv) { if (OutputFilename != "") { if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! - cerr << argv[0] << ": error opening '" << OutputFilename - << "': file exists!\n" - << "Use -f command line argument to force output\n"; + std::cerr << argv[0] << ": error opening '" << OutputFilename + << "': file exists!\n" + << "Use -f command line argument to force output\n"; return 1; } Out = new std::ofstream(OutputFilename.c_str()); if (!Out->good()) { - cerr << argv[0] << ": error opening " << OutputFilename << "!\n"; + std::cerr << argv[0] << ": error opening " << OutputFilename << "!\n"; return 1; } @@ -130,10 +127,11 @@ int main(int argc, char **argv) { assert(target.get() && "Could not allocate target machine!"); Passes.add(Opt->getTargetCtor()(*target.get())); } else - cerr << argv[0] << ": cannot create pass: " << Opt->getPassName() << "\n"; + std::cerr << argv[0] << ": cannot create pass: " << Opt->getPassName() + << "\n"; if (PrintEachXForm) - Passes.add(new PrintModulePass(&cerr)); + Passes.add(new PrintModulePass(&std::cerr)); } // Check that the module is well formed on completion of optimization @@ -146,7 +144,7 @@ int main(int argc, char **argv) { // Now that we have all of the passes ready, run them. if (Passes.run(*M.get()) && !Quiet) - cerr << "Program modified.\n"; + std::cerr << "Program modified.\n"; return 0; } -- cgit v1.1