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
This commit is contained in:
Rui Ueyama
2014-01-16 03:13:19 +00:00
parent 2666b15908
commit 6a8151dba1
2 changed files with 21 additions and 40 deletions

View File

@@ -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