[llvm-commits] CVS: llvm/tools/opt/opt.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu May 22 15:14:01 PDT 2003


Changes in directory llvm/tools/opt:

opt.cpp updated: 1.81 -> 1.82

---
Log message:

Kill using declarations


---
Diffs of the changes:

Index: llvm/tools/opt/opt.cpp
diff -u llvm/tools/opt/opt.cpp:1.81 llvm/tools/opt/opt.cpp:1.82
--- llvm/tools/opt/opt.cpp:1.81	Thu Apr 24 14:10:09 2003
+++ llvm/tools/opt/opt.cpp	Thu May 22 15:13:16 2003
@@ -20,9 +20,6 @@
 #include <memory>
 #include <algorithm>
 
-using std::cerr;
-using std::string;
-
 
 // The OptimizationList is automatically populated with registered Passes by the
 // PassNameParser.
@@ -34,10 +31,10 @@
 
 // Other command line options...
 //
-static cl::opt<string>
+static cl::opt<std::string>
 InputFilename(cl::Positional, cl::desc("<input bytecode>"), cl::init("-"));
 
-static cl::opt<string>
+static cl::opt<std::string>
 OutputFilename("o", cl::desc("Override output filename"),
                cl::value_desc("filename"));
 
@@ -78,11 +75,11 @@
   // Load the input module...
   std::auto_ptr<Module> 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 @@
   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 @@
       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 @@
 
   // 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;
 }





More information about the llvm-commits mailing list