From 83d954b278a0d81ed63a91c6b08fb28c3ad9ac41 Mon Sep 17 00:00:00 2001 From: Joseph Tremoulet Date: Thu, 4 Apr 2019 14:13:28 +0000 Subject: [PATCH] [COFF] Fix delay import directory iterator Summary: Take the Index into account in `getDelayImportTable`, otherwise we always return the entry for the first delay DLL reference. Reviewers: ruiu Reviewed By: ruiu Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60081 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357697 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Object/COFFObjectFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index 7839c65516b..d52206d8cd3 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/lib/Object/COFFObjectFile.cpp @@ -1457,7 +1457,7 @@ std::error_code DelayImportDirectoryEntryRef::getName(StringRef &Result) const { std::error_code DelayImportDirectoryEntryRef:: getDelayImportTable(const delay_import_directory_table_entry *&Result) const { - Result = Table; + Result = &Table[Index]; return std::error_code(); } -- 2.50.1