[cfe-commits] r54872 - /cfe/trunk/Driver/PrintPreprocessedOutput.cpp
Chris Lattner
sabre at nondot.org
Sun Aug 17 00:09:08 PDT 2008
Author: lattner
Date: Sun Aug 17 02:09:08 2008
New Revision: 54872
URL: http://llvm.org/viewvc/llvm-project?rev=54872&view=rev
Log:
printing with an unspecified dest means to print to stdout.
Modified:
cfe/trunk/Driver/PrintPreprocessedOutput.cpp
Modified: cfe/trunk/Driver/PrintPreprocessedOutput.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/PrintPreprocessedOutput.cpp?rev=54872&r1=54871&r2=54872&view=diff
==============================================================================
--- cfe/trunk/Driver/PrintPreprocessedOutput.cpp (original)
+++ cfe/trunk/Driver/PrintPreprocessedOutput.cpp Sun Aug 17 02:09:08 2008
@@ -500,7 +500,7 @@
// Open the output buffer.
std::string Err;
- llvm::raw_fd_ostream OS(OutFile.c_str(), Err);
+ llvm::raw_fd_ostream OS(OutFile.empty() ? "-" : OutFile.c_str(), Err);
if (!Err.empty()) {
fprintf(stderr, "%s\n", Err.c_str());
exit(1);
More information about the cfe-commits
mailing list