*Fix usage of changed function prototype*Use Archive interface to symbol table for archives

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17795 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2004-11-14 22:27:46 +00:00
parent d129664066
commit 63efb77980

View File

@ -18,6 +18,7 @@
#include "llvm/Module.h"
#include "llvm/Bytecode/Reader.h"
#include "llvm/Bytecode/Archive.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/System/Signals.h"
@ -132,11 +133,13 @@ void DumpSymbolNamesFromFile (std::string &Filename) {
std::cerr << ToolName << ": " << Filename << ": " << ErrorMessage << "\n";
return;
}
} else if (IsArchive (Filename)) {
} else if (IsArchive(Filename)) {
Archive* archive = Archive::OpenAndLoad(sys::Path(Filename));
if (!archive)
std::cerr << ToolName << ": " << Filename << ": " << ErrorMessage << "\n";
std::vector<Module *> Modules;
if (ReadArchiveFile (Filename, Modules, &ErrorMessage)) {
std::cerr << ToolName << ": " << Filename << ": "
<< ErrorMessage << "\n";
if (archive->getAllModules(Modules,&ErrorMessage)) {
std::cerr << ToolName << ": " << Filename << ": " << ErrorMessage << "\n";
return;
}
MultipleFiles = true;