summaryrefslogtreecommitdiff
path: root/tools/llc
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-18 17:26:50 +0000
committerDan Gohman <gohman@apple.com>2010-08-18 17:26:50 +0000
commit510cea0f908e27bff181d3a5fa8fa76f652bb631 (patch)
tree4be4ce6f1452d97822ec026ab981c25c3cf1d444 /tools/llc
parentca91912a3bc6804fcc75f896237ea5c7937dc105 (diff)
downloadllvm-510cea0f908e27bff181d3a5fa8fa76f652bb631.tar.gz
llvm-510cea0f908e27bff181d3a5fa8fa76f652bb631.tar.bz2
llvm-510cea0f908e27bff181d3a5fa8fa76f652bb631.tar.xz
Don't translate "-" to outs() manually; raw_ostream does that
automatically. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llc')
-rw-r--r--tools/llc/llc.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index 5e36351b08..5a23b27710 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -127,14 +127,11 @@ GetFileNameRoot(const std::string &InputFilename) {
static formatted_raw_ostream *GetOutputStream(const char *TargetName,
Triple::OSType OS,
const char *ProgName) {
- if (OutputFilename != "") {
- if (OutputFilename == "-")
- return new formatted_raw_ostream(outs(),
- formatted_raw_ostream::PRESERVE_STREAM);
-
+ if (!OutputFilename.empty()) {
// Make sure that the Out file gets unlinked from the disk if we get a
// SIGINT
- sys::RemoveFileOnSignal(sys::Path(OutputFilename));
+ if (OutputFilename != "-")
+ sys::RemoveFileOnSignal(sys::Path(OutputFilename));
std::string error;
raw_fd_ostream *FDOut =