[llvm-commits] [llvm] r111649 - /llvm/trunk/utils/FileUpdate/FileUpdate.cpp

Dan Gohman gohman at apple.com
Fri Aug 20 09:56:11 PDT 2010


Author: djg
Date: Fri Aug 20 11:56:11 2010
New Revision: 111649

URL: http://llvm.org/viewvc/llvm-project?rev=111649&view=rev
Log:
Diagnose attempts to update standard output.

Modified:
    llvm/trunk/utils/FileUpdate/FileUpdate.cpp

Modified: llvm/trunk/utils/FileUpdate/FileUpdate.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileUpdate/FileUpdate.cpp?rev=111649&r1=111648&r2=111649&view=diff
==============================================================================
--- llvm/trunk/utils/FileUpdate/FileUpdate.cpp (original)
+++ llvm/trunk/utils/FileUpdate/FileUpdate.cpp Fri Aug 20 11:56:11 2010
@@ -36,6 +36,11 @@
   PrettyStackTraceProgram X(argc, argv);
   cl::ParseCommandLineOptions(argc, argv);
 
+  if (OutputFilename == "-") {
+    errs() << argv[0] << ": error: Can't update standard output\n";
+    return 1;
+  }
+
   // Get the input data.
   std::string ErrorStr;
   MemoryBuffer *In =





More information about the llvm-commits mailing list