diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Object/WindowsResource.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Object/WindowsResource.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/Object/WindowsResource.cpp b/contrib/llvm-project/llvm/lib/Object/WindowsResource.cpp index d50f149629c3..089a3fa0f91f 100644 --- a/contrib/llvm-project/llvm/lib/Object/WindowsResource.cpp +++ b/contrib/llvm-project/llvm/lib/Object/WindowsResource.cpp @@ -173,7 +173,7 @@ static bool convertUTF16LEToUTF8String(ArrayRef<UTF16> Src, std::string &Out) { EndianCorrectedSrc.resize(Src.size() + 1); llvm::copy(Src, EndianCorrectedSrc.begin() + 1); EndianCorrectedSrc[0] = UNI_UTF16_BYTE_ORDER_MARK_SWAPPED; - return convertUTF16ToUTF8String(makeArrayRef(EndianCorrectedSrc), Out); + return convertUTF16ToUTF8String(ArrayRef(EndianCorrectedSrc), Out); } static std::string makeDuplicateResourceError( @@ -938,7 +938,7 @@ void WindowsResourceCOFFWriter::writeDirectoryTree() { RelocationAddresses.resize(Data.size()); // Now write all the resource data entries. - for (auto DataNodes : DataEntriesTreeOrder) { + for (const auto *DataNodes : DataEntriesTreeOrder) { auto *Entry = reinterpret_cast<coff_resource_data_entry *>(BufferStart + CurrentOffset); RelocationAddresses[DataNodes->getDataIndex()] = CurrentRelativeOffset; @@ -989,6 +989,7 @@ void WindowsResourceCOFFWriter::writeFirstSectionRelocations() { Reloc->Type = COFF::IMAGE_REL_I386_DIR32NB; break; case COFF::IMAGE_FILE_MACHINE_ARM64: + case COFF::IMAGE_FILE_MACHINE_ARM64EC: Reloc->Type = COFF::IMAGE_REL_ARM64_ADDR32NB; break; default: |