aboutsummaryrefslogtreecommitdiff
path: root/Driver/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-08-17 07:09:08 +0000
committerChris Lattner <sabre@nondot.org>2008-08-17 07:09:08 +0000
commit653201b7d20a554e11e8c59f0afc41dd7a815410 (patch)
tree463a95bfcce27f40000cdc7451c38fd7d7c2d50a /Driver/PrintPreprocessedOutput.cpp
parent76b3a72f783ccaa5dfeea0a9f0457e5e37a2d478 (diff)
printing with an unspecified dest means to print to stdout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/PrintPreprocessedOutput.cpp')
-rw-r--r--Driver/PrintPreprocessedOutput.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Driver/PrintPreprocessedOutput.cpp b/Driver/PrintPreprocessedOutput.cpp
index 2a363f8ee1..b9030087bc 100644
--- a/Driver/PrintPreprocessedOutput.cpp
+++ b/Driver/PrintPreprocessedOutput.cpp
@@ -500,7 +500,7 @@ void clang::DoPrintPreprocessedInput(Preprocessor &PP,
// 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);