summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-07-31 19:25:21 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-07-31 19:25:21 +0000
commit1c0aa04e7ee73046d43091510ab674605d2d8b7d (patch)
treee3492e028a3c6b04e912a5b03e69880e20e1a9eb /llvm/lib/Object
parent26bdcaf4d216f2eadfd2b7ec86382f253daf265e (diff)
downloadbcm5719-llvm-1c0aa04e7ee73046d43091510ab674605d2d8b7d.tar.gz
bcm5719-llvm-1c0aa04e7ee73046d43091510ab674605d2d8b7d.zip
[COFF] Remove a duplicate import_directory_table_entry definition
We had import_directory_table_entry and coff_import_directory_table_entry, remove one. Also, factor out the logic which determins if a descriptor is a terminator. llvm-svn: 277296
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 0f790086cfc..07cff3b06f1 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -538,7 +538,7 @@ std::error_code COFFObjectFile::initImportTablePtr() {
if (std::error_code EC = checkOffset(Data, IntPtr, DataEntry->Size))
return EC;
ImportDirectory = reinterpret_cast<
- const import_directory_table_entry *>(IntPtr);
+ const coff_import_directory_table_entry *>(IntPtr);
return std::error_code();
}
@@ -772,7 +772,7 @@ basic_symbol_iterator COFFObjectFile::symbol_end_impl() const {
import_directory_iterator COFFObjectFile::import_directory_begin() const {
if (!ImportDirectory)
return import_directory_end();
- if (ImportDirectory[0].ImportLookupTableRVA == 0)
+ if (ImportDirectory->isNull())
return import_directory_end();
return import_directory_iterator(
ImportDirectoryEntryRef(ImportDirectory, 0, this));
@@ -1201,14 +1201,14 @@ operator==(const ImportDirectoryEntryRef &Other) const {
void ImportDirectoryEntryRef::moveNext() {
++Index;
- if (ImportTable[Index].ImportLookupTableRVA == 0) {
+ if (ImportTable[Index].isNull()) {
Index = -1;
ImportTable = nullptr;
}
}
std::error_code ImportDirectoryEntryRef::getImportTableEntry(
- const import_directory_table_entry *&Result) const {
+ const coff_import_directory_table_entry *&Result) const {
return getObject(Result, OwningObject->Data, ImportTable + Index);
}
OpenPOWER on IntegriCloud