projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a4575e
)
Diagnose attempts to update standard output.
author
Dan Gohman
<gohman@apple.com>
Fri, 20 Aug 2010 16:56:11 +0000
(16:56 +0000)
committer
Dan Gohman
<gohman@apple.com>
Fri, 20 Aug 2010 16:56:11 +0000
(16:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111649
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/FileUpdate/FileUpdate.cpp
patch
|
blob
|
history
diff --git
a/utils/FileUpdate/FileUpdate.cpp
b/utils/FileUpdate/FileUpdate.cpp
index b97d9cf74e55af786e5b6c2582c3566553b22a78..8377aea79e84fdaa8f3e3454a278cba75c0a45ca 100644
(file)
--- a/
utils/FileUpdate/FileUpdate.cpp
+++ b/
utils/FileUpdate/FileUpdate.cpp
@@
-36,6
+36,11
@@
int main(int argc, char **argv) {
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 =