llvm.org GIT mirror llvm / d12cef8
llvm-objdump: Don't print "Import table:" header if there's no import table. If a binary does not depend on any DLL, it does not contain import table at all. Printing the section title without contents looks wrong, so we shouldn't print it in that case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199340 91177308-0d34-0410-b5e6-96231b3b80d8 Rui Ueyama 6 years ago
1 changed file(s) with 5 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
229229 // Prints import tables. The import table is a table containing the list of
230230 // DLL name and symbol names which will be linked by the loader.
231231 static void printImportTables(const COFFObjectFile *Obj) {
232 import_directory_iterator i = Obj->import_directory_begin();
233 import_directory_iterator e = Obj->import_directory_end();
234 if (i == e)
235 return;
232236 outs() << "The Import Tables:\n";
233237 error_code ec;
234 for (import_directory_iterator i = Obj->import_directory_begin(),
235 e = Obj->import_directory_end();
236 i != e; i = i.increment(ec)) {
238 for (; i != e; i = i.increment(ec)) {
237239 if (ec)
238240 return;
239241