summaryrefslogtreecommitdiff
path: root/tools/llvm-ld
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-09-01 14:20:41 +0000
committerDan Gohman <gohman@apple.com>2010-09-01 14:20:41 +0000
commitd4c454317a38d65957edebe62bfc69fc8d9885e8 (patch)
treedbf117519d428f04854447edee010962e68e5753 /tools/llvm-ld
parent41154114f64c1531764236e9268d2a5ac52e3e91 (diff)
downloadllvm-d4c454317a38d65957edebe62bfc69fc8d9885e8.tar.gz
llvm-d4c454317a38d65957edebe62bfc69fc8d9885e8.tar.bz2
llvm-d4c454317a38d65957edebe62bfc69fc8d9885e8.tar.xz
Make tool_output_file's raw_ostream instance a member variable instead
of a base class. This makes it possible to unregister the file from FilesToRemove when the file is done. Also, this eliminates the need for formatted_tool_output_file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ld')
-rw-r--r--tools/llvm-ld/llvm-ld.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/llvm-ld/llvm-ld.cpp b/tools/llvm-ld/llvm-ld.cpp
index e4b2ae5d67..3bbea9dc72 100644
--- a/tools/llvm-ld/llvm-ld.cpp
+++ b/tools/llvm-ld/llvm-ld.cpp
@@ -244,7 +244,7 @@ void GenerateBitcode(Module* M, const std::string& FileName) {
}
// Write it out
- WriteBitcodeToFile(M, Out);
+ WriteBitcodeToFile(M, Out.os());
Out.keep();
}
@@ -432,10 +432,10 @@ static void EmitShellScript(char **argv, Module *M) {
if (!ErrorInfo.empty())
PrintAndExit(ErrorInfo, M);
- Out2 << "#!/bin/sh\n";
+ Out2.os() << "#!/bin/sh\n";
// Allow user to setenv LLVMINTERP if lli is not in their PATH.
- Out2 << "lli=${LLVMINTERP-lli}\n";
- Out2 << "exec $lli \\\n";
+ Out2.os() << "lli=${LLVMINTERP-lli}\n";
+ Out2.os() << "exec $lli \\\n";
// gcc accepts -l<lib> and implicitly searches /lib and /usr/lib.
LibPaths.push_back("/lib");
LibPaths.push_back("/usr/lib");
@@ -466,9 +466,9 @@ static void EmitShellScript(char **argv, Module *M) {
if (FullLibraryPath.isEmpty())
FullLibraryPath = sys::Path::FindLibrary(*i);
if (!FullLibraryPath.isEmpty())
- Out2 << " -load=" << FullLibraryPath.str() << " \\\n";
+ Out2.os() << " -load=" << FullLibraryPath.str() << " \\\n";
}
- Out2 << " " << BitcodeOutputFilename << " ${1+\"$@\"}\n";
+ Out2.os() << " " << BitcodeOutputFilename << " ${1+\"$@\"}\n";
Out2.keep();
}