[llvm-commits] CVS: llvm/tools/link/link.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu May 22 15:14:06 PDT 2003
Changes in directory llvm/tools/link:
link.cpp updated: 1.23 -> 1.24
---
Log message:
Kill using declarations
---
Diffs of the changes:
Index: llvm/tools/link/link.cpp
diff -u llvm/tools/link/link.cpp:1.23 llvm/tools/link/link.cpp:1.24
--- llvm/tools/link/link.cpp:1.23 Tue Jul 30 16:43:21 2002
+++ llvm/tools/link/link.cpp Thu May 22 15:13:15 2003
@@ -20,8 +20,6 @@
#include <sys/types.h> // For FileExists
#include <sys/stat.h>
-using std::cerr;
-
static cl::list<std::string>
InputFilenames(cl::Positional, cl::OneOrMore,
cl::desc("<input bytecode files>"));
@@ -59,15 +57,15 @@
bool FoundAFile = false;
while (1) {
- if (Verbose) cerr << "Loading '" << Filename << "'\n";
+ if (Verbose) std::cerr << "Loading '" << Filename << "'\n";
if (FileExists(Filename)) FoundAFile = true;
Module *Result = ParseBytecodeFile(Filename, &ErrorMessage);
if (Result) return std::auto_ptr<Module>(Result); // Load successful!
if (Verbose) {
- cerr << "Error opening bytecode file: '" << Filename << "'";
- if (ErrorMessage.size()) cerr << ": " << ErrorMessage;
- cerr << "\n";
+ std::cerr << "Error opening bytecode file: '" << Filename << "'";
+ if (ErrorMessage.size()) std::cerr << ": " << ErrorMessage;
+ std::cerr << "\n";
}
if (NextLibPathIdx == LibPaths.size()) break;
@@ -75,10 +73,10 @@
}
if (FoundAFile)
- cerr << "Bytecode file '" << FN << "' corrupt! "
- << "Use 'link -v ...' for more info.\n";
+ std::cerr << "Bytecode file '" << FN << "' corrupt! "
+ << "Use 'link -v ...' for more info.\n";
else
- cerr << "Could not locate bytecode file: '" << FN << "'\n";
+ std::cerr << "Could not locate bytecode file: '" << FN << "'\n";
return std::auto_ptr<Module>();
}
@@ -106,29 +104,29 @@
std::auto_ptr<Module> M(LoadFile(InputFilenames[i]));
if (M.get() == 0) return 1;
- if (Verbose) cerr << "Linking in '" << InputFilenames[i] << "'\n";
+ if (Verbose) std::cerr << "Linking in '" << InputFilenames[i] << "'\n";
if (LinkModules(Composite.get(), M.get(), &ErrorMessage)) {
- cerr << argv[0] << ": error linking in '" << InputFilenames[i] << "': "
- << ErrorMessage << "\n";
+ std::cerr << argv[0] << ": error linking in '" << InputFilenames[i]
+ << "': " << ErrorMessage << "\n";
return 1;
}
}
- if (DumpAsm) cerr << "Here's the assembly:\n" << Composite.get();
+ if (DumpAsm) std::cerr << "Here's the assembly:\n" << Composite.get();
std::ostream *Out = &std::cout; // Default to printing to stdout...
if (OutputFilename != "-") {
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());
if (!Out->good()) {
- cerr << argv[0] << ": error opening '" << OutputFilename << "'!\n";
+ std::cerr << argv[0] << ": error opening '" << OutputFilename << "'!\n";
return 1;
}
@@ -137,7 +135,7 @@
RemoveFileOnSignal(OutputFilename);
}
- if (Verbose) cerr << "Writing bytecode...\n";
+ if (Verbose) std::cerr << "Writing bytecode...\n";
WriteBytecodeToFile(Composite.get(), *Out);
if (Out != &std::cout) delete Out;
More information about the llvm-commits
mailing list