diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-07 22:34:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-07 22:34:44 +0000 |
commit | 5bdf1614182c679c0d0a50f28f5810ee14110800 (patch) | |
tree | 548684b1f0128a5ef5d2858ac0332caa7f9886e2 /tools | |
parent | 06272dcfb277367caddb578fb7f0e1cade8c00e5 (diff) | |
download | external_llvm-5bdf1614182c679c0d0a50f28f5810ee14110800.zip external_llvm-5bdf1614182c679c0d0a50f28f5810ee14110800.tar.gz external_llvm-5bdf1614182c679c0d0a50f28f5810ee14110800.tar.bz2 |
Perform debug outputs with ->dump() instead of <<
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/link/link.cpp | 11 | ||||
-rw-r--r-- | tools/llvm-link/llvm-link.cpp | 11 |
2 files changed, 12 insertions, 10 deletions
diff --git a/tools/link/link.cpp b/tools/link/link.cpp index ec77b42..c4be671 100644 --- a/tools/link/link.cpp +++ b/tools/link/link.cpp @@ -12,7 +12,6 @@ #include "llvm/Transforms/Linker.h" #include "llvm/Bytecode/Reader.h" #include "llvm/Bytecode/Writer.h" -#include "llvm/Assembly/Writer.h" #include "llvm/Module.h" #include "Support/CommandLine.h" #include <fstream> @@ -56,7 +55,7 @@ static inline std::auto_ptr<Module> LoadFile(const std::string &FN) { if (Verbose) { cerr << "Error opening bytecode file: '" << Filename << "'"; if (ErrorMessage.size()) cerr << ": " << ErrorMessage; - cerr << endl; + cerr << "\n"; } if (NextLibPathIdx == LibPaths.size()) break; @@ -104,13 +103,15 @@ int main(int argc, char **argv) { if (LinkModules(Composite.get(), M.get(), &ErrorMessage)) { cerr << "Error linking in '" << InputFilenames[i] << "': " - << ErrorMessage << endl; + << ErrorMessage << "\n"; return 1; } } - if (DumpAsm) - cerr << "Here's the assembly:\n" << Composite.get(); + if (DumpAsm) { + cerr << "Here's the assembly:\n"; + Composite.get()->dump(); + } ostream *Out = &cout; // Default to printing to stdout... if (OutputFilename != "-") { diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index ec77b42..c4be671 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -12,7 +12,6 @@ #include "llvm/Transforms/Linker.h" #include "llvm/Bytecode/Reader.h" #include "llvm/Bytecode/Writer.h" -#include "llvm/Assembly/Writer.h" #include "llvm/Module.h" #include "Support/CommandLine.h" #include <fstream> @@ -56,7 +55,7 @@ static inline std::auto_ptr<Module> LoadFile(const std::string &FN) { if (Verbose) { cerr << "Error opening bytecode file: '" << Filename << "'"; if (ErrorMessage.size()) cerr << ": " << ErrorMessage; - cerr << endl; + cerr << "\n"; } if (NextLibPathIdx == LibPaths.size()) break; @@ -104,13 +103,15 @@ int main(int argc, char **argv) { if (LinkModules(Composite.get(), M.get(), &ErrorMessage)) { cerr << "Error linking in '" << InputFilenames[i] << "': " - << ErrorMessage << endl; + << ErrorMessage << "\n"; return 1; } } - if (DumpAsm) - cerr << "Here's the assembly:\n" << Composite.get(); + if (DumpAsm) { + cerr << "Here's the assembly:\n"; + Composite.get()->dump(); + } ostream *Out = &cout; // Default to printing to stdout... if (OutputFilename != "-") { |