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

llvm-svn: 17795
This commit is contained in:
Reid Spencer 2004-11-14 22:27:46 +00:00
parent 7cd9ae667f
commit 37c081cfb6

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;