mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 13:10:34 +00:00
Modify llvm-nm to use new Binary creation method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132912 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
69aec36f9b
commit
bc437ebbca
@ -317,13 +317,13 @@ static void DumpSymbolNamesFromFile(std::string &Filename) {
|
||||
MultipleFiles = true;
|
||||
std::for_each (Modules.begin(), Modules.end(), DumpSymbolNamesFromModule);
|
||||
} else if (aPath.isObjectFile()) {
|
||||
std::auto_ptr<ObjectFile> obj(ObjectFile::createObjectFile(aPath.str()));
|
||||
if (!obj.get()) {
|
||||
errs() << ToolName << ": " << Filename << ": "
|
||||
<< "Failed to open object file\n";
|
||||
OwningPtr<Binary> obj;
|
||||
if (error_code ec = object::createBinary(aPath.str(), obj)) {
|
||||
errs() << ToolName << ": " << Filename << ": " << ec.message() << ".\n";
|
||||
return;
|
||||
}
|
||||
DumpSymbolNamesFromObject(obj.get());
|
||||
if (object::ObjectFile *o = dyn_cast<ObjectFile>(obj.get()))
|
||||
DumpSymbolNamesFromObject(o);
|
||||
} else {
|
||||
errs() << ToolName << ": " << Filename << ": "
|
||||
<< "unrecognizable file type\n";
|
||||
|
Loading…
Reference in New Issue
Block a user