diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-24 18:20:21 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-24 18:20:21 +0000 |
commit | 4fbd373815119eb1f72b137701e54ddad64389fc (patch) | |
tree | 1c8311e7fcd2c3ef461f88c95fd86378cd073c73 /clang/lib/Frontend | |
parent | 90c7f1cc161769853db72e30e76c34b0e4ddf3da (diff) | |
download | bcm5719-llvm-4fbd373815119eb1f72b137701e54ddad64389fc.tar.gz bcm5719-llvm-4fbd373815119eb1f72b137701e54ddad64389fc.zip |
Update for llvm api change.
llvm-svn: 202053
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 12 | ||||
-rw-r--r-- | clang/lib/Frontend/DependencyFile.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Frontend/DependencyGraph.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Frontend/FrontendActions.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Frontend/HeaderIncludeGen.cpp | 3 |
5 files changed, 11 insertions, 10 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index df0095205c3..3fe8f0e82f7 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -114,9 +114,9 @@ static void SetUpDiagnosticLog(DiagnosticOptions *DiagOpts, raw_ostream *OS = &llvm::errs(); if (DiagOpts->DiagnosticLogFile != "-") { // Create the output stream. - llvm::raw_fd_ostream *FileOS( - new llvm::raw_fd_ostream(DiagOpts->DiagnosticLogFile.c_str(), ErrorInfo, - llvm::sys::fs::F_Append)); + llvm::raw_fd_ostream *FileOS(new llvm::raw_fd_ostream( + DiagOpts->DiagnosticLogFile.c_str(), ErrorInfo, + llvm::sys::fs::F_Append | llvm::sys::fs::F_Text)); if (!ErrorInfo.empty()) { Diags.Report(diag::warn_fe_cc_log_diagnostics_failure) << DiagOpts->DiagnosticLogFile << ErrorInfo; @@ -142,7 +142,7 @@ static void SetupSerializedDiagnostics(DiagnosticOptions *DiagOpts, std::string ErrorInfo; OwningPtr<llvm::raw_fd_ostream> OS; OS.reset(new llvm::raw_fd_ostream(OutputFile.str().c_str(), ErrorInfo, - llvm::sys::fs::F_Binary)); + llvm::sys::fs::F_None)); if (!ErrorInfo.empty()) { Diags.Report(diag::warn_fe_serialized_diag_failure) @@ -582,7 +582,7 @@ CompilerInstance::createOutputFile(StringRef OutputPath, OSFile = OutFile; OS.reset(new llvm::raw_fd_ostream( OSFile.c_str(), Error, - (Binary ? llvm::sys::fs::F_Binary : llvm::sys::fs::F_None))); + (Binary ? llvm::sys::fs::F_None : llvm::sys::fs::F_Text))); if (!Error.empty()) return 0; } @@ -1022,7 +1022,7 @@ static void checkConfigMacro(Preprocessor &PP, StringRef ConfigMacro, static void writeTimestampFile(StringRef TimestampFile) { std::string ErrorInfo; llvm::raw_fd_ostream Out(TimestampFile.str().c_str(), ErrorInfo, - llvm::sys::fs::F_Binary); + llvm::sys::fs::F_None); } /// \brief Prune the module cache of modules that haven't been accessed in diff --git a/clang/lib/Frontend/DependencyFile.cpp b/clang/lib/Frontend/DependencyFile.cpp index 0aa1a05eff4..39ccdd736c5 100644 --- a/clang/lib/Frontend/DependencyFile.cpp +++ b/clang/lib/Frontend/DependencyFile.cpp @@ -171,7 +171,7 @@ void DependencyFileCallback::OutputDependencyFile() { } std::string Err; - llvm::raw_fd_ostream OS(OutputFile.c_str(), Err, llvm::sys::fs::F_None); + llvm::raw_fd_ostream OS(OutputFile.c_str(), Err, llvm::sys::fs::F_Text); if (!Err.empty()) { PP->getDiagnostics().Report(diag::err_fe_error_opening) << OutputFile << Err; diff --git a/clang/lib/Frontend/DependencyGraph.cpp b/clang/lib/Frontend/DependencyGraph.cpp index a45d978e30a..6f12e630561 100644 --- a/clang/lib/Frontend/DependencyGraph.cpp +++ b/clang/lib/Frontend/DependencyGraph.cpp @@ -101,7 +101,7 @@ DependencyGraphCallback::writeNodeReference(raw_ostream &OS, void DependencyGraphCallback::OutputGraphFile() { std::string Err; - llvm::raw_fd_ostream OS(OutputFile.c_str(), Err, llvm::sys::fs::F_None); + llvm::raw_fd_ostream OS(OutputFile.c_str(), Err, llvm::sys::fs::F_Text); if (!Err.empty()) { PP->getDiagnostics().Report(diag::err_fe_error_opening) << OutputFile << Err; diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index d3a738fff74..eda21c5f3f7 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -451,7 +451,7 @@ void DumpModuleInfoAction::ExecuteAction() { if (!OutputFileName.empty() && OutputFileName != "-") { std::string ErrorInfo; OutFile.reset(new llvm::raw_fd_ostream(OutputFileName.str().c_str(), - ErrorInfo, llvm::sys::fs::F_None)); + ErrorInfo, llvm::sys::fs::F_Text)); } llvm::raw_ostream &Out = OutFile.get()? *OutFile.get() : llvm::outs(); diff --git a/clang/lib/Frontend/HeaderIncludeGen.cpp b/clang/lib/Frontend/HeaderIncludeGen.cpp index 237e5b1ac0c..00ff63746c9 100644 --- a/clang/lib/Frontend/HeaderIncludeGen.cpp +++ b/clang/lib/Frontend/HeaderIncludeGen.cpp @@ -56,7 +56,8 @@ void clang::AttachHeaderIncludeGen(Preprocessor &PP, bool ShowAllHeaders, if (!OutputPath.empty()) { std::string Error; llvm::raw_fd_ostream *OS = new llvm::raw_fd_ostream( - OutputPath.str().c_str(), Error, llvm::sys::fs::F_Append); + OutputPath.str().c_str(), Error, + llvm::sys::fs::F_Append | llvm::sys::fs::F_Text); if (!Error.empty()) { PP.getDiagnostics().Report( clang::diag::warn_fe_cc_print_header_failure) << Error; |