summaryrefslogtreecommitdiff
path: root/tools/llvm-extract
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-18 17:21:42 +0000
committerDan Gohman <gohman@apple.com>2010-08-18 17:21:42 +0000
commitca91912a3bc6804fcc75f896237ea5c7937dc105 (patch)
tree17877ee1833c37b0d4d73311db78a35b52c15e17 /tools/llvm-extract
parent0a6ee29aae63b60f4545a69f87de79f1f60a1b95 (diff)
Don't register stdout to be deleted on a signal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-extract')
-rw-r--r--tools/llvm-extract/llvm-extract.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp
index e6b5b8465d7..440d1bdcb50 100644
--- a/tools/llvm-extract/llvm-extract.cpp
+++ b/tools/llvm-extract/llvm-extract.cpp
@@ -118,7 +118,8 @@ int main(int argc, char **argv) {
// Make sure that the Output 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 ErrorInfo;
raw_fd_ostream Out(OutputFilename.c_str(), ErrorInfo,