mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-07 16:42:34 +00:00
Update for llvm api change.
llvm-svn: 202045
This commit is contained in:
parent
c00c6e661f
commit
dc59a36caa
@ -247,7 +247,7 @@ bool writeFiles(const clang::Rewriter &Rewrites) {
|
||||
|
||||
std::string ErrorInfo;
|
||||
|
||||
llvm::raw_fd_ostream FileStream(FileName, ErrorInfo);
|
||||
llvm::raw_fd_ostream FileStream(FileName, ErrorInfo, llvm::sys::fs::F_None);
|
||||
if (!ErrorInfo.empty()) {
|
||||
errs() << "Warning: Could not write to " << FileName << "\n";
|
||||
continue;
|
||||
|
@ -272,7 +272,8 @@ int main(int argc, char **argv) {
|
||||
|
||||
// Write new file to disk
|
||||
std::string ErrorInfo;
|
||||
llvm::raw_fd_ostream FileStream(I->getKey().str().c_str(), ErrorInfo);
|
||||
llvm::raw_fd_ostream FileStream(I->getKey().str().c_str(), ErrorInfo,
|
||||
llvm::sys::fs::F_None);
|
||||
if (!ErrorInfo.empty()) {
|
||||
llvm::errs() << "Could not open " << I->getKey() << " for writing\n";
|
||||
continue;
|
||||
|
@ -51,7 +51,8 @@ void writePerfDataJSON(
|
||||
<< ".json";
|
||||
|
||||
std::string ErrorInfo;
|
||||
llvm::raw_fd_ostream FileStream(SS.str().c_str(), ErrorInfo);
|
||||
llvm::raw_fd_ostream FileStream(SS.str().c_str(), ErrorInfo,
|
||||
llvm::sys::fs::F_None);
|
||||
FileStream << "{\n";
|
||||
FileStream << " \"Sources\" : [\n";
|
||||
for (SourcePerfData::const_iterator I = TimingResults.begin(),
|
||||
|
@ -249,7 +249,7 @@ static bool writeModuleMap(llvm::StringRef ModuleMapPath,
|
||||
|
||||
// Set up module map output file.
|
||||
std::string Error;
|
||||
llvm::tool_output_file Out(FilePath.c_str(), Error);
|
||||
llvm::tool_output_file Out(FilePath.c_str(), Error, llvm::sys::fs::F_None);
|
||||
if (!Error.empty()) {
|
||||
llvm::errs() << Argv0 << ": error opening " << FilePath << ":" << Error
|
||||
<< "\n";
|
||||
|
@ -214,7 +214,8 @@ int main(int Argc, const char **Argv) {
|
||||
} else {
|
||||
// Set up output file.
|
||||
std::string Error;
|
||||
llvm::tool_output_file Out(OutputFileName.c_str(), Error);
|
||||
llvm::tool_output_file Out(OutputFileName.c_str(), Error,
|
||||
llvm::sys::fs::F_None);
|
||||
if (!Error.empty()) {
|
||||
llvm::errs() << "pp-trace: error creating " << OutputFileName << ":"
|
||||
<< Error << "\n";
|
||||
|
Loading…
Reference in New Issue
Block a user