Update clang for raw_fd_ostream no longer requiring F_Force.

llvm-svn: 79991
This commit is contained in:
Dan Gohman 2009-08-25 15:36:09 +00:00
parent 61a8796ddb
commit a98e0e73de
6 changed files with 9 additions and 17 deletions

View File

@ -149,8 +149,7 @@ void CXXRecordDecl::viewInheritance(ASTContext& Context) const {
llvm::errs() << "Writing '" << Filename.c_str() << "'... ";
llvm::raw_fd_ostream O(Filename.c_str(), ErrMsg,
raw_fd_ostream::F_Force);
llvm::raw_fd_ostream O(Filename.c_str(), ErrMsg);
if (ErrMsg.empty()) {
InheritanceHierarchyWriter Writer(Context, O);

View File

@ -475,8 +475,7 @@ static ExplodedNode::Auditor* CreateUbiViz() {
llvm::errs() << "Writing '" << Filename.str() << "'.\n";
llvm::OwningPtr<llvm::raw_fd_ostream> Stream;
Stream.reset(new llvm::raw_fd_ostream(Filename.c_str(), ErrMsg,
llvm::raw_fd_ostream::F_Force));
Stream.reset(new llvm::raw_fd_ostream(Filename.c_str(), ErrMsg));
if (!ErrMsg.empty())
return 0;

View File

@ -46,8 +46,7 @@ bool FixItRewriter::WriteFixedFile(const std::string &InFileName,
if (!OutFileName.empty()) {
std::string Err;
OutFile = new llvm::raw_fd_ostream(OutFileName.c_str(), Err,
llvm::raw_fd_ostream::F_Binary |
llvm::raw_fd_ostream::F_Force);
llvm::raw_fd_ostream::F_Binary);
OwnedStream.reset(OutFile);
} else if (InFileName == "-") {
OutFile = &llvm::outs();
@ -58,8 +57,7 @@ bool FixItRewriter::WriteFixedFile(const std::string &InFileName,
Path.appendSuffix("fixit." + Suffix);
std::string Err;
OutFile = new llvm::raw_fd_ostream(Path.c_str(), Err,
llvm::raw_fd_ostream::F_Binary |
llvm::raw_fd_ostream::F_Force);
llvm::raw_fd_ostream::F_Binary);
OwnedStream.reset(OutFile);
}

View File

@ -337,8 +337,7 @@ PlistDiagnostics::~PlistDiagnostics() {
// Open the file.
std::string ErrMsg;
llvm::raw_fd_ostream o(OutputFile.c_str(), ErrMsg,
llvm::raw_fd_ostream::F_Force);
llvm::raw_fd_ostream o(OutputFile.c_str(), ErrMsg);
if (!ErrMsg.empty()) {
llvm::errs() << "warning: could not creat file: " << OutputFile << '\n';
return;

View File

@ -1,4 +1,4 @@
// RUN: clang-cc -g -o %t %s -emit-llvm-bc && llc %t -f -o %t.s
// RUN: clang-cc -g -o %t %s -emit-llvm-bc && llc %t -o %t.s
# 1 "a.c"
# 1 "a.c" 1
# 1 "<built-in>" 1

View File

@ -1702,8 +1702,7 @@ static void SetUpBuildDumpLog(unsigned argc, char **argv,
std::string ErrorInfo;
BuildLogFile = new llvm::raw_fd_ostream(DumpBuildInformation.c_str(),
ErrorInfo,
llvm::raw_fd_ostream::F_Force);
ErrorInfo);
if (!ErrorInfo.empty()) {
llvm::errs() << "error opening -dump-build-information file '"
@ -1751,8 +1750,7 @@ static llvm::raw_ostream *ComputeOutFile(const std::string &InFile,
std::string Error;
Ret = new llvm::raw_fd_ostream(OutFile.c_str(), Error,
(Binary ? llvm::raw_fd_ostream::F_Binary : 0) |
llvm::raw_fd_ostream::F_Force);
(Binary ? llvm::raw_fd_ostream::F_Binary : 0));
if (!Error.empty()) {
// FIXME: Don't fail this way.
llvm::errs() << "ERROR: " << Error << "\n";
@ -2310,8 +2308,7 @@ int main(int argc, char **argv) {
}
std::string ErrStr;
DependencyOS =
new llvm::raw_fd_ostream(DependencyFile.c_str(), ErrStr,
llvm::raw_fd_ostream::F_Force);
new llvm::raw_fd_ostream(DependencyFile.c_str(), ErrStr);
if (!ErrStr.empty()) {
// FIXME: Use a proper diagnostic
llvm::errs() << "unable to open dependency file: " + ErrStr;