aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-04-16 17:41:08 +0000
committerChris Lattner <sabre@nondot.org>2003-04-16 17:41:08 +0000
commit2c1d2f21fd9e3abee2a1ccce2cb5fd27a7146091 (patch)
tree8b390ebdfa7bdcbc054317b4a75695b85f01f138 /tools
parentf2956fcc115c2c7c8c354f13fbafee08f99b6c7a (diff)
downloadexternal_llvm-2c1d2f21fd9e3abee2a1ccce2cb5fd27a7146091.zip
external_llvm-2c1d2f21fd9e3abee2a1ccce2cb5fd27a7146091.tar.gz
external_llvm-2c1d2f21fd9e3abee2a1ccce2cb5fd27a7146091.tar.bz2
* Get rid of using declaration
* Add two compatibility options to work better with new GCC frontend git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/gccas/gccas.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp
index ea02691..2e418a3 100644
--- a/tools/gccas/gccas.cpp
+++ b/tools/gccas/gccas.cpp
@@ -21,7 +21,6 @@
#include "Support/Signals.h"
#include <memory>
#include <fstream>
-using std::cerr;
namespace {
// FIXME: This should eventually be parameterized...
@@ -42,6 +41,12 @@ namespace {
cl::opt<bool>
Verify("verify", cl::desc("Verify each pass result"));
+
+ cl::opt<std::string> // Be compatible with what GCC expects
+ QOption("Q", cl::desc("Compatibility option (ignored)"),
+ cl::Hidden, cl::Prefix);
+ cl::opt<bool>
+ PrintVersion("V", cl::desc("Print GCCAS version number"), cl::Hidden);
}
@@ -103,12 +108,12 @@ int main(int argc, char **argv) {
// Parse the file now...
M.reset(ParseAssemblyFile(InputFilename));
} catch (const ParseException &E) {
- cerr << argv[0] << ": " << E.getMessage() << "\n";
+ std::cerr << argv[0] << ": " << E.getMessage() << "\n";
return 1;
}
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;
}
@@ -125,13 +130,16 @@ int main(int argc, char **argv) {
std::ofstream Out(OutputFilename.c_str(), std::ios::out);
if (!Out.good()) {
- cerr << argv[0] << ": error opening " << OutputFilename << "!\n";
+ std::cerr << argv[0] << ": error opening " << OutputFilename << "!\n";
return 1;
}
// Make sure that the Out file gets unlink'd from the disk if we get a SIGINT
RemoveFileOnSignal(OutputFilename);
+ if (PrintVersion)
+ std::cerr << "LLVM GCCAS version xx\n"; /* For GNU compatibility */
+
// In addition to just parsing the input from GCC, we also want to spiff it up
// a little bit. Do this now.
//