tool of a pipeline is having issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3168
91177308-0d34-0410-b5e6-
96231b3b80d8
// Parse the file now...
std::auto_ptr<Module> M(ParseAssemblyFile(InputFilename));
if (M.get() == 0) {
// Parse the file now...
std::auto_ptr<Module> M(ParseAssemblyFile(InputFilename));
if (M.get() == 0) {
- cerr << "assembly didn't read correctly.\n";
+ cerr << argv[0] << ": assembly didn't read correctly.\n";
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!
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 << "Error opening '" << OutputFilename << "': File exists!\n"
+ cerr << argv[0] << ": error opening '" << OutputFilename
+ << "': file exists!\n"
<< "Use -f command line argument to force output\n";
return 1;
}
<< "Use -f command line argument to force output\n";
return 1;
}
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
- cerr << "Error opening '" << OutputFilename << "': File exists!\n"
+ cerr << argv[0] << ": error opening '" << OutputFilename
+ << "': file exists!\n"
<< "Use -f command line argument to force output\n";
return 1;
}
<< "Use -f command line argument to force output\n";
return 1;
}
- cerr << "Error opening " << OutputFilename << "!\n";
+ cerr << argv[0] << ": error opening " << OutputFilename << "!\n";
return 1;
}
WriteBytecodeToFile(M.get(), *Out);
} catch (const ParseException &E) {
return 1;
}
WriteBytecodeToFile(M.get(), *Out);
} catch (const ParseException &E) {
- cerr << E.getMessage() << std::endl;
+ cerr << argv[0] << ": " << E.getMessage() << "\n";
// Parse the file now...
M.reset(ParseAssemblyFile(InputFilename));
} catch (const ParseException &E) {
// Parse the file now...
M.reset(ParseAssemblyFile(InputFilename));
} catch (const ParseException &E) {
- cerr << E.getMessage() << "\n";
+ cerr << argv[0] << ": " << E.getMessage() << "\n";
return 1;
}
if (M.get() == 0) {
return 1;
}
if (M.get() == 0) {
- cerr << "assembly didn't read correctly.\n";
+ cerr << argv[0] << ": assembly didn't read correctly.\n";
std::ofstream Out(OutputFilename.c_str(), std::ios::out);
if (!Out.good()) {
std::ofstream Out(OutputFilename.c_str(), std::ios::out);
if (!Out.good()) {
- cerr << "Error opening " << OutputFilename << "!\n";
+ cerr << argv[0] << ": error opening " << OutputFilename << "!\n";
if (Verbose) cerr << "Linking in '" << InputFilenames[i] << "'\n";
if (LinkModules(Composite.get(), M.get(), &ErrorMessage)) {
if (Verbose) cerr << "Linking in '" << InputFilenames[i] << "'\n";
if (LinkModules(Composite.get(), M.get(), &ErrorMessage)) {
- cerr << "Error linking in '" << InputFilenames[i] << "': "
+ cerr << argv[0] << ": error linking in '" << InputFilenames[i] << "': "
<< ErrorMessage << "\n";
return 1;
}
<< ErrorMessage << "\n";
return 1;
}
if (OutputFilename != "-") {
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
if (OutputFilename != "-") {
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
- cerr << "Error opening '" << OutputFilename << "': File exists!\n"
+ 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()) {
<< "Use -f command line argument to force output\n";
return 1;
}
Out = new std::ofstream(OutputFilename.c_str());
if (!Out->good()) {
- cerr << "Error opening '" << OutputFilename << "'!\n";
+ cerr << argv[0] << ": error opening '" << OutputFilename << "'!\n";
// Parse the file now...
std::auto_ptr<Module> M(ParseAssemblyFile(InputFilename));
if (M.get() == 0) {
// Parse the file now...
std::auto_ptr<Module> M(ParseAssemblyFile(InputFilename));
if (M.get() == 0) {
- cerr << "assembly didn't read correctly.\n";
+ cerr << argv[0] << ": assembly didn't read correctly.\n";
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!
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 << "Error opening '" << OutputFilename << "': File exists!\n"
+ cerr << argv[0] << ": error opening '" << OutputFilename
+ << "': file exists!\n"
<< "Use -f command line argument to force output\n";
return 1;
}
<< "Use -f command line argument to force output\n";
return 1;
}
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
- cerr << "Error opening '" << OutputFilename << "': File exists!\n"
+ cerr << argv[0] << ": error opening '" << OutputFilename
+ << "': file exists!\n"
<< "Use -f command line argument to force output\n";
return 1;
}
<< "Use -f command line argument to force output\n";
return 1;
}
- cerr << "Error opening " << OutputFilename << "!\n";
+ cerr << argv[0] << ": error opening " << OutputFilename << "!\n";
return 1;
}
WriteBytecodeToFile(M.get(), *Out);
} catch (const ParseException &E) {
return 1;
}
WriteBytecodeToFile(M.get(), *Out);
} catch (const ParseException &E) {
- cerr << E.getMessage() << std::endl;
+ cerr << argv[0] << ": " << E.getMessage() << "\n";
// Parse the file now...
std::auto_ptr<Module> M(ParseAssemblyFile(InputFilename));
if (M.get() == 0) {
// Parse the file now...
std::auto_ptr<Module> M(ParseAssemblyFile(InputFilename));
if (M.get() == 0) {
- cerr << "assembly didn't read correctly.\n";
+ cerr << argv[0] << ": assembly didn't read correctly.\n";
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!
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 << "Error opening '" << OutputFilename << "': File exists!\n"
+ cerr << argv[0] << ": error opening '" << OutputFilename
+ << "': file exists!\n"
<< "Use -f command line argument to force output\n";
return 1;
}
<< "Use -f command line argument to force output\n";
return 1;
}
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
- cerr << "Error opening '" << OutputFilename << "': File exists!\n"
+ cerr << argv[0] << ": error opening '" << OutputFilename
+ << "': file exists!\n"
<< "Use -f command line argument to force output\n";
return 1;
}
<< "Use -f command line argument to force output\n";
return 1;
}
- cerr << "Error opening " << OutputFilename << "!\n";
+ cerr << argv[0] << ": error opening " << OutputFilename << "!\n";
return 1;
}
WriteBytecodeToFile(M.get(), *Out);
} catch (const ParseException &E) {
return 1;
}
WriteBytecodeToFile(M.get(), *Out);
} catch (const ParseException &E) {
- cerr << E.getMessage() << std::endl;
+ cerr << argv[0] << ": " << E.getMessage() << "\n";
if (Verbose) cerr << "Linking in '" << InputFilenames[i] << "'\n";
if (LinkModules(Composite.get(), M.get(), &ErrorMessage)) {
if (Verbose) cerr << "Linking in '" << InputFilenames[i] << "'\n";
if (LinkModules(Composite.get(), M.get(), &ErrorMessage)) {
- cerr << "Error linking in '" << InputFilenames[i] << "': "
+ cerr << argv[0] << ": error linking in '" << InputFilenames[i] << "': "
<< ErrorMessage << "\n";
return 1;
}
<< ErrorMessage << "\n";
return 1;
}
if (OutputFilename != "-") {
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
if (OutputFilename != "-") {
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
- cerr << "Error opening '" << OutputFilename << "': File exists!\n"
+ 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()) {
<< "Use -f command line argument to force output\n";
return 1;
}
Out = new std::ofstream(OutputFilename.c_str());
if (!Out->good()) {
- cerr << "Error opening '" << OutputFilename << "'!\n";
+ cerr << argv[0] << ": error opening '" << OutputFilename << "'!\n";
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
+// LLVM Modular Optimizer Utility: opt
//
// Optimizations may be specified an arbitrary number of times on the command
// line, they are run in the order specified.
//
// Optimizations may be specified an arbitrary number of times on the command
// line, they are run in the order specified.
// Load the input module...
std::auto_ptr<Module> M(ParseBytecodeFile(InputFilename));
if (M.get() == 0) {
// Load the input module...
std::auto_ptr<Module> M(ParseBytecodeFile(InputFilename));
if (M.get() == 0) {
- cerr << "bytecode didn't read correctly.\n";
+ cerr << argv[0] << ": bytecode didn't read correctly.\n";
if (OutputFilename != "") {
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
if (OutputFilename != "") {
if (!Force && std::ifstream(OutputFilename.c_str())) {
// If force is not specified, make sure not to overwrite a file!
- cerr << "Error opening '" << OutputFilename << "': File exists!\n"
+ 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()) {
<< "Use -f command line argument to force output\n";
return 1;
}
Out = new std::ofstream(OutputFilename.c_str());
if (!Out->good()) {
- cerr << "Error opening " << OutputFilename << "!\n";
+ cerr << argv[0] << ": error opening " << OutputFilename << "!\n";
else if (Opt->getDataCtor())
Passes.add(Opt->getDataCtor()(TD)); // Pass dummy target data...
else
else if (Opt->getDataCtor())
Passes.add(Opt->getDataCtor()(TD)); // Pass dummy target data...
else
- cerr << "Cannot create pass: " << Opt->getPassName() << "\n";
+ cerr << argv[0] << ": cannot create pass: " << Opt->getPassName() << "\n";
if (PrintEachXForm)
Passes.add(new PrintModulePass(&cerr));
if (PrintEachXForm)
Passes.add(new PrintModulePass(&cerr));