mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[master-next] More changes to adapt to new LLVM flags in r334221
My previous change for this issue (033b884de6) did not fix all the
affected code. This gets the rest of them. Thanks for Jason Molenda
for helping with this. rdar://problem/41025365
This commit is contained in:
@@ -212,7 +212,8 @@ static bool emitLoadedModuleTraceIfNeeded(ASTContext &ctxt,
|
||||
StringRef realPath;
|
||||
int FD;
|
||||
// FIXME: appropriate error handling
|
||||
if (llvm::sys::fs::openFileForRead(dep, FD, &buffer)) {
|
||||
if (llvm::sys::fs::openFileForRead(dep, FD, llvm::sys::fs::OF_None,
|
||||
&buffer)) {
|
||||
// Couldn't open the file now, so let's just assume the old path was
|
||||
// canonical (enough).
|
||||
realPath = dep;
|
||||
@@ -1440,7 +1441,7 @@ static bool dumpAPI(ModuleDecl *Mod, StringRef OutDir) {
|
||||
}
|
||||
|
||||
std::error_code EC;
|
||||
llvm::raw_fd_ostream OS(OutPath, EC, fs::OpenFlags::F_RW);
|
||||
llvm::raw_fd_ostream OS(OutPath, EC, fs::FA_Read | fs::FA_Write);
|
||||
if (EC) {
|
||||
llvm::errs() << "error opening file '" << OutPath << "': "
|
||||
<< EC.message() << '\n';
|
||||
|
||||
Reference in New Issue
Block a user