From 6a8151dba16a2315e1b2a7daf27ff454c26d0ad5 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 16 Jan 2014 03:13:19 +0000 Subject: Don't use DataRefImpl to implement ImportDirectoryEntryRef. DataRefImpl (a union of two integers and a pointer) is not the ideal data type to represent a reference to an import directory entity. We should just use the pointer to the import table and an offset instead to simplify. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199349 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/COFF.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h index aaffbbcb5e..431029045f 100644 --- a/include/llvm/Object/COFF.h +++ b/include/llvm/Object/COFF.h @@ -369,9 +369,9 @@ public: class ImportDirectoryEntryRef { public: ImportDirectoryEntryRef() : OwningObject(0) {} - ImportDirectoryEntryRef(DataRefImpl ImportDirectory, + ImportDirectoryEntryRef(const import_directory_table_entry *Table, uint32_t I, const COFFObjectFile *Owner) - : ImportDirectoryPimpl(ImportDirectory), OwningObject(Owner) {} + : ImportTable(Table), Index(I), OwningObject(Owner) {} bool operator==(const ImportDirectoryEntryRef &Other) const; error_code getNext(ImportDirectoryEntryRef &Result) const; @@ -384,7 +384,8 @@ public: getImportLookupEntry(const import_lookup_table_entry32 *&Result) const; private: - DataRefImpl ImportDirectoryPimpl; + const import_directory_table_entry *ImportTable; + uint32_t Index; const COFFObjectFile *OwningObject; }; } // end namespace object -- cgit v1.2.3