Skip to content

Commit

Permalink
Merge pull request #342 from plotfi/upstream-with-swift
Browse files Browse the repository at this point in the history
Adding sys::fs::convertFDToNativeFile(FD), to address llvm.org/D63452

apple-llvm-split-commit: 0bd7fd920b2533eaf6bde5c94f31ff1fd4d35622
apple-llvm-split-dir: clang/
  • Loading branch information
compnerd committed Jul 12, 2019
2 parents 4a111d2 + 1d3f2b7 commit 7d1a072
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clang/lib/Index/IndexUnitReader.cpp
Expand Up @@ -425,7 +425,8 @@ IndexUnitReader::createWithFilePath(StringRef FilePath, std::string &Error) {
return nullptr;
}

auto ErrOrBuf = MemoryBuffer::getOpenFile(FD, FilePath, /*FileSize=*/-1,
auto ErrOrBuf = MemoryBuffer::getOpenFile(sys::fs::convertFDToNativeFile(FD),
FilePath, /*FileSize=*/-1,
/*RequiresNullTerminator=*/false);
if (!ErrOrBuf) {
raw_string_ostream(Error) << "Failed opening '" << FilePath << "': "
Expand Down

0 comments on commit 7d1a072

Please sign in to comment.