[llvm] r357697 - [COFF] Fix delay import directory iterator

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 07:13:28 PDT 2019


Author: josepht
Date: Thu Apr  4 07:13:28 2019
New Revision: 357697

URL: http://llvm.org/viewvc/llvm-project?rev=357697&view=rev
Log:
[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

Modified:
    llvm/trunk/lib/Object/COFFObjectFile.cpp

Modified: llvm/trunk/lib/Object/COFFObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/COFFObjectFile.cpp?rev=357697&r1=357696&r2=357697&view=diff
==============================================================================
--- llvm/trunk/lib/Object/COFFObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/COFFObjectFile.cpp Thu Apr  4 07:13:28 2019
@@ -1457,7 +1457,7 @@ std::error_code DelayImportDirectoryEntr
 
 std::error_code DelayImportDirectoryEntryRef::
 getDelayImportTable(const delay_import_directory_table_entry *&Result) const {
-  Result = Table;
+  Result = &Table[Index];
   return std::error_code();
 }
 




More information about the llvm-commits mailing list