[llvm] r366786 - Fix gold-plugin Windows build
Yi Kong via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 00:41:17 PDT 2019
Author: kongyi
Date: Tue Jul 23 00:41:17 2019
New Revision: 366786
URL: http://llvm.org/viewvc/llvm-project?rev=366786&view=rev
Log:
Fix gold-plugin Windows build
r365588 missed one instance of integer file descriptor use in
gold-plugin.cpp.
Modified:
llvm/trunk/tools/gold/gold-plugin.cpp
Modified: llvm/trunk/tools/gold/gold-plugin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=366786&r1=366785&r2=366786&view=diff
==============================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)
+++ llvm/trunk/tools/gold/gold-plugin.cpp Tue Jul 23 00:41:17 2019
@@ -513,8 +513,8 @@ static ld_plugin_status claim_file_hook(
offset = file->offset;
}
ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
- MemoryBuffer::getOpenFileSlice(file->fd, file->name, file->filesize,
- offset);
+ MemoryBuffer::getOpenFileSlice(sys::fs::convertFDToNativeFile(file->fd),
+ file->name, file->filesize, offset);
if (std::error_code EC = BufferOrErr.getError()) {
message(LDPL_ERROR, EC.message().c_str());
return LDPS_ERR;
More information about the llvm-commits
mailing list