aboutsummaryrefslogtreecommitdiff
path: root/Driver/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
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);