diff options
author | Dan Gohman <gohman@apple.com> | 2009-07-15 17:32:18 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-07-15 17:32:18 +0000 |
commit | 92db2841691b2f2a99294872ead8887854297ed7 (patch) | |
tree | 052094821b19e26a4713b3778e3feda03ef8150a /lib/Frontend | |
parent | d065393638a7bc12ed721e490939f43db2478310 (diff) |
Update for raw_fd_ostream API changes. raw_fd_ostream now has a
Force flag to control whether the case of opening an existing
file is considered an error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75802 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r-- | lib/Frontend/AnalysisConsumer.cpp | 3 | ||||
-rw-r--r-- | lib/Frontend/FixItRewriter.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/PlistDiagnostics.cpp | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/lib/Frontend/AnalysisConsumer.cpp b/lib/Frontend/AnalysisConsumer.cpp index 06af2d9a4e..6433bdf7a4 100644 --- a/lib/Frontend/AnalysisConsumer.cpp +++ b/lib/Frontend/AnalysisConsumer.cpp @@ -587,7 +587,8 @@ static ExplodedNodeImpl::Auditor* CreateUbiViz() { llvm::OwningPtr<llvm::raw_fd_ostream> Stream; std::string filename = Filename.toString(); - Stream.reset(new llvm::raw_fd_ostream(filename.c_str(), false, ErrMsg)); + Stream.reset(new llvm::raw_fd_ostream(filename.c_str(), false, + /*Force=*/true, ErrMsg)); if (!ErrMsg.empty()) return 0; diff --git a/lib/Frontend/FixItRewriter.cpp b/lib/Frontend/FixItRewriter.cpp index 1ed89d75a9..cd7cee0f68 100644 --- a/lib/Frontend/FixItRewriter.cpp +++ b/lib/Frontend/FixItRewriter.cpp @@ -47,6 +47,7 @@ bool FixItRewriter::WriteFixedFile(const std::string &InFileName, OutFile = new llvm::raw_fd_ostream(OutFileName.c_str(), // set binary mode (critical for Windoze) true, + /*Force=*/true, Err); OwnedStream.reset(OutFile); } else if (InFileName == "-") { @@ -60,6 +61,7 @@ bool FixItRewriter::WriteFixedFile(const std::string &InFileName, OutFile = new llvm::raw_fd_ostream(Path.toString().c_str(), // set binary mode (critical for Windoze) true, + /*Force=*/true, Err); OwnedStream.reset(OutFile); } diff --git a/lib/Frontend/PlistDiagnostics.cpp b/lib/Frontend/PlistDiagnostics.cpp index 387ed45a9c..f3a954358e 100644 --- a/lib/Frontend/PlistDiagnostics.cpp +++ b/lib/Frontend/PlistDiagnostics.cpp @@ -319,7 +319,7 @@ PlistDiagnostics::~PlistDiagnostics() { // Open the file. std::string ErrMsg; - llvm::raw_fd_ostream o(OutputFile.c_str(), false, ErrMsg); + llvm::raw_fd_ostream o(OutputFile.c_str(), false, /*Force=*/true, ErrMsg); if (!ErrMsg.empty()) { llvm::errs() << "warning: could not creat file: " << OutputFile << '\n'; return; |