aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-as
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-22 20:13:16 +0000
committerChris Lattner <sabre@nondot.org>2003-05-22 20:13:16 +0000
commit6c8103f7ddb734d128739a463bcd0667d73c62aa (patch)
treed513d29aacc379458ac318f8d7c67f0825932e67 /tools/llvm-as
parentca6433f233b7ed432916ba07976f9a4e9e0767b0 (diff)
downloadexternal_llvm-6c8103f7ddb734d128739a463bcd0667d73c62aa.zip
external_llvm-6c8103f7ddb734d128739a463bcd0667d73c62aa.tar.gz
external_llvm-6c8103f7ddb734d128739a463bcd0667d73c62aa.tar.bz2
Kill using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-as')
-rw-r--r--tools/llvm-as/as.cpp29
-rw-r--r--tools/llvm-as/llvm-as.cpp29
2 files changed, 28 insertions, 30 deletions
diff --git a/tools/llvm-as/as.cpp b/tools/llvm-as/as.cpp
index c9bd3b4..d1f7406 100644
--- a/tools/llvm-as/as.cpp
+++ b/tools/llvm-as/as.cpp
@@ -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 @@ int main(int argc, char **argv) {
// 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 @@ int main(int argc, char **argv) {
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 @@ int main(int argc, char **argv) {
}
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;
}
diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp
index c9bd3b4..d1f7406 100644
--- a/tools/llvm-as/llvm-as.cpp
+++ b/tools/llvm-as/llvm-as.cpp
@@ -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 @@ int main(int argc, char **argv) {
// 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 @@ int main(int argc, char **argv) {
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 @@ int main(int argc, char **argv) {
}
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;
}