X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FObject%2FCOFFObjectFile.cpp;h=ec8989d5c67cb07ffc35abdad0b8e36be568ebdd;hb=daa4c91647ae5abfc55bd1425ecf146680ca7bd1;hp=4709612167ce986d71b0b803258c626347e57808;hpb=6010e5dfee44e3a26d32317d3f80f4ce2dbebb99;p=oota-llvm.git diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index 4709612167c..ec8989d5c67 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/lib/Object/COFFObjectFile.cpp @@ -458,7 +458,8 @@ error_code COFFObjectFile::initExportTablePtr() { uintptr_t IntPtr = 0; if (error_code EC = getRvaPtr(ExportTableRva, IntPtr)) return EC; - ExportDirectory = reinterpret_cast(IntPtr); + ExportDirectory = + reinterpret_cast(IntPtr); return object_error::success; } @@ -733,7 +734,8 @@ ArrayRef COFFObjectFile::getSymbolAuxData( == 0 && "Aux Symbol data did not point to the beginning of a symbol"); # endif } - return ArrayRef(Aux, Symbol->NumberOfAuxSymbols * sizeof(coff_symbol)); + return ArrayRef(Aux, + Symbol->NumberOfAuxSymbols * sizeof(coff_symbol)); } error_code COFFObjectFile::getSectionName(const coff_section *Sec, @@ -959,6 +961,12 @@ error_code ExportDirectoryEntryRef::getDllName(StringRef &Result) const { return object_error::success; } +// Returns the starting ordinal number. +error_code ExportDirectoryEntryRef::getOrdinalBase(uint32_t &Result) const { + Result = ExportTable->OrdinalBase; + return object_error::success; +} + // Returns the export ordinal of the current export symbol. error_code ExportDirectoryEntryRef::getOrdinal(uint32_t &Result) const { Result = ExportTable->OrdinalBase + Index; @@ -971,7 +979,8 @@ error_code ExportDirectoryEntryRef::getExportRVA(uint32_t &Result) const { if (error_code EC = OwningObject->getRvaPtr( ExportTable->ExportAddressTableRVA, IntPtr)) return EC; - const export_address_table_entry *entry = reinterpret_cast(IntPtr); + const export_address_table_entry *entry = + reinterpret_cast(IntPtr); Result = entry[Index].ExportRVA; return object_error::success; }