[llvm-commits] [llvm] r111368 - /llvm/trunk/tools/llvm-extract/llvm-extract.cpp

Dan Gohman gohman at apple.com
Wed Aug 18 10:21:42 PDT 2010


Author: djg
Date: Wed Aug 18 12:21:42 2010
New Revision: 111368

URL: http://llvm.org/viewvc/llvm-project?rev=111368&view=rev
Log:
Don't register stdout to be deleted on a signal.

Modified:
    llvm/trunk/tools/llvm-extract/llvm-extract.cpp

Modified: llvm/trunk/tools/llvm-extract/llvm-extract.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-extract/llvm-extract.cpp?rev=111368&r1=111367&r2=111368&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-extract/llvm-extract.cpp (original)
+++ llvm/trunk/tools/llvm-extract/llvm-extract.cpp Wed Aug 18 12:21:42 2010
@@ -118,7 +118,8 @@
 
   // 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,





More information about the llvm-commits mailing list