[cfe-commits] r79991 - in /cfe/trunk: lib/AST/InheritViz.cpp lib/Frontend/AnalysisConsumer.cpp lib/Frontend/FixItRewriter.cpp lib/Frontend/PlistDiagnostics.cpp test/CodeGen/2009-04-23-dbg.c tools/clang-cc/clang-cc.cpp

Dan Gohman gohman at apple.com
Tue Aug 25 08:36:09 PDT 2009


Author: djg
Date: Tue Aug 25 10:36:09 2009
New Revision: 79991

URL: http://llvm.org/viewvc/llvm-project?rev=79991&view=rev
Log:
Update clang for raw_fd_ostream no longer requiring F_Force.

Modified:
    cfe/trunk/lib/AST/InheritViz.cpp
    cfe/trunk/lib/Frontend/AnalysisConsumer.cpp
    cfe/trunk/lib/Frontend/FixItRewriter.cpp
    cfe/trunk/lib/Frontend/PlistDiagnostics.cpp
    cfe/trunk/test/CodeGen/2009-04-23-dbg.c
    cfe/trunk/tools/clang-cc/clang-cc.cpp

Modified: cfe/trunk/lib/AST/InheritViz.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/InheritViz.cpp?rev=79991&r1=79990&r2=79991&view=diff

==============================================================================
--- cfe/trunk/lib/AST/InheritViz.cpp (original)
+++ cfe/trunk/lib/AST/InheritViz.cpp Tue Aug 25 10:36:09 2009
@@ -149,8 +149,7 @@
 
   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);

Modified: cfe/trunk/lib/Frontend/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/AnalysisConsumer.cpp?rev=79991&r1=79990&r2=79991&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/Frontend/AnalysisConsumer.cpp Tue Aug 25 10:36:09 2009
@@ -475,8 +475,7 @@
   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;

Modified: cfe/trunk/lib/Frontend/FixItRewriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FixItRewriter.cpp?rev=79991&r1=79990&r2=79991&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/FixItRewriter.cpp (original)
+++ cfe/trunk/lib/Frontend/FixItRewriter.cpp Tue Aug 25 10:36:09 2009
@@ -46,8 +46,7 @@
   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 @@
     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);
   }  
 

Modified: cfe/trunk/lib/Frontend/PlistDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PlistDiagnostics.cpp?rev=79991&r1=79990&r2=79991&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/PlistDiagnostics.cpp (original)
+++ cfe/trunk/lib/Frontend/PlistDiagnostics.cpp Tue Aug 25 10:36:09 2009
@@ -337,8 +337,7 @@
 
   // 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;

Modified: cfe/trunk/test/CodeGen/2009-04-23-dbg.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2009-04-23-dbg.c?rev=79991&r1=79990&r2=79991&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/2009-04-23-dbg.c (original)
+++ cfe/trunk/test/CodeGen/2009-04-23-dbg.c Tue Aug 25 10:36:09 2009
@@ -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

Modified: cfe/trunk/tools/clang-cc/clang-cc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/clang-cc.cpp?rev=79991&r1=79990&r2=79991&view=diff

==============================================================================
--- cfe/trunk/tools/clang-cc/clang-cc.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang-cc.cpp Tue Aug 25 10:36:09 2009
@@ -1702,8 +1702,7 @@
   
   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 @@
 
   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 @@
       }
       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;





More information about the cfe-commits mailing list