Clean up anands patch
[oota-llvm.git] / tools / as / as.cpp
index 9eff9721720ac01368e61d85d8bbc4553f1c2495..a956203e64910420a617c426b04c11d87a808a6e 100644 (file)
@@ -6,7 +6,7 @@
 //   as [options]      - Read LLVM assembly from stdin, write bytecode to stdout
 //   as [options] x.ll - Read LLVM assembly from the x.ll file, write bytecode
 //                       to the x.bc file.
-//
+// 
 //===------------------------------------------------------------------------===
 
 #include "llvm/Module.h"
@@ -15,8 +15,8 @@
 #include "Support/CommandLine.h"
 #include "Support/Signals.h"
 #include <fstream>
-#include <string>
 #include <memory>
+using std::cerr;
 
 cl::String InputFilename ("", "Parse <arg> file, compile to bytecode", 0, "-");
 cl::String OutputFilename("o", "Override output filename", cl::NoFlags, "");
@@ -26,7 +26,7 @@ cl::Flag   DumpAsm       ("d", "Print assembly as parsed", cl::Hidden, false);
 int main(int argc, char **argv) {
   cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n");
 
-  ostream *Out = 0;
+  std::ostream *Out = 0;
   try {
     // Parse the file now...
     std::auto_ptr<Module> M(ParseAssemblyFile(InputFilename));
@@ -48,7 +48,7 @@ int main(int argc, char **argv) {
     } else {
       if (InputFilename == "-") {
        OutputFilename = "-";
-       Out = &cout;
+       Out = &std::cout;
       } else {
        std::string IFN = InputFilename;
        int Len = IFN.length();
@@ -81,11 +81,11 @@ int main(int argc, char **argv) {
    
     WriteBytecodeToFile(M.get(), *Out);
   } catch (const ParseException &E) {
-    cerr << E.getMessage() << endl;
+    cerr << E.getMessage() << std::endl;
     return 1;
   }
 
-  if (Out != &cout) delete Out;
+  if (Out != &std::cout) delete Out;
   return 0;
 }