Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/tools/llvm-objdump/COFFDump.cpp
Show First 20 Lines • Show All 635 Lines • ▼ Show 20 Lines | |||||
void printCOFFSymbolTable(const object::COFFImportFile *i) { | void printCOFFSymbolTable(const object::COFFImportFile *i) { | ||||
unsigned Index = 0; | unsigned Index = 0; | ||||
bool IsCode = i->getCOFFImportHeader()->getType() == COFF::IMPORT_CODE; | bool IsCode = i->getCOFFImportHeader()->getType() == COFF::IMPORT_CODE; | ||||
for (const object::BasicSymbolRef &Sym : i->symbols()) { | for (const object::BasicSymbolRef &Sym : i->symbols()) { | ||||
std::string Name; | std::string Name; | ||||
raw_string_ostream NS(Name); | raw_string_ostream NS(Name); | ||||
cantFail(Sym.printName(NS)); | llvm_cantFail(Sym.printName(NS)); | ||||
NS.flush(); | NS.flush(); | ||||
outs() << "[" << format("%2d", Index) << "]" | outs() << "[" << format("%2d", Index) << "]" | ||||
<< "(sec " << format("%2d", 0) << ")" | << "(sec " << format("%2d", 0) << ")" | ||||
<< "(fl 0x00)" // Flag bits, which COFF doesn't have. | << "(fl 0x00)" // Flag bits, which COFF doesn't have. | ||||
<< "(ty " << format("%3x", (IsCode && Index) ? 32 : 0) << ")" | << "(ty " << format("%3x", (IsCode && Index) ? 32 : 0) << ")" | ||||
<< "(scl " << format("%3x", 0) << ") " | << "(scl " << format("%3x", 0) << ") " | ||||
<< "(nx " << 0 << ") " | << "(nx " << 0 << ") " | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |