[llvm-commits] CVS: llvm/tools/llvm-nm/llvm-nm.cpp
Reid Spencer
reid at x10sys.com
Sun Nov 14 14:28:23 PST 2004
Changes in directory llvm/tools/llvm-nm:
llvm-nm.cpp updated: 1.18 -> 1.19
---
Log message:
*Fix usage of changed function prototype*Use Archive interface to symbol table for archives
---
Diffs of the changes: (+7 -4)
Index: llvm/tools/llvm-nm/llvm-nm.cpp
diff -u llvm/tools/llvm-nm/llvm-nm.cpp:1.18 llvm/tools/llvm-nm/llvm-nm.cpp:1.19
--- llvm/tools/llvm-nm/llvm-nm.cpp:1.18 Wed Sep 1 17:55:37 2004
+++ llvm/tools/llvm-nm/llvm-nm.cpp Sun Nov 14 16:27:46 2004
@@ -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 @@
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;
More information about the llvm-commits
mailing list