From 653201b7d20a554e11e8c59f0afc41dd7a815410 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 17 Aug 2008 07:09:08 +0000 Subject: [PATCH] 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 --- Driver/PrintPreprocessedOutput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.40.0