[llvm-commits] CVS: llvm/tools/as/as.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu May 22 15:14:14 PDT 2003
Changes in directory llvm/tools/as:
as.cpp updated: 1.17 -> 1.18
---
Log message:
Kill using declarations
---
Diffs of the changes:
Index: llvm/tools/as/as.cpp
diff -u llvm/tools/as/as.cpp:1.17 llvm/tools/as/as.cpp:1.18
--- llvm/tools/as/as.cpp:1.17 Fri Aug 30 17:54:41 2002
+++ llvm/tools/as/as.cpp Thu May 22 15:13:13 2003
@@ -17,13 +17,11 @@
#include "Support/Signals.h"
#include <fstream>
#include <memory>
-using std::cerr;
-using std::string;
-static cl::opt<string>
+static cl::opt<std::string>
InputFilename(cl::Positional, cl::desc("<input .llvm file>"), cl::init("-"));
-static cl::opt<string>
+static cl::opt<std::string>
OutputFilename("o", cl::desc("Override output filename"),
cl::value_desc("filename"));
@@ -41,24 +39,25 @@
// Parse the file now...
std::auto_ptr<Module> M(ParseAssemblyFile(InputFilename));
if (M.get() == 0) {
- cerr << argv[0] << ": assembly didn't read correctly.\n";
+ std::cerr << argv[0] << ": assembly didn't read correctly.\n";
return 1;
}
if (verifyModule(*M.get())) {
- cerr << argv[0] << ": assembly parsed, but does not verify as correct!\n";
+ std::cerr << argv[0]
+ << ": assembly parsed, but does not verify as correct!\n";
return 1;
}
- if (DumpAsm) cerr << "Here's the assembly:\n" << M.get();
+ if (DumpAsm) std::cerr << "Here's the assembly:\n" << M.get();
if (OutputFilename != "") { // Specified an output filename?
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());
@@ -79,9 +78,9 @@
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;
}
@@ -93,13 +92,13 @@
}
if (!Out->good()) {
- cerr << argv[0] << ": error opening " << OutputFilename << "!\n";
+ std::cerr << argv[0] << ": error opening " << OutputFilename << "!\n";
return 1;
}
WriteBytecodeToFile(M.get(), *Out);
} catch (const ParseException &E) {
- cerr << argv[0] << ": " << E.getMessage() << "\n";
+ std::cerr << argv[0] << ": " << E.getMessage() << "\n";
return 1;
}
More information about the llvm-commits
mailing list