summaryrefslogtreecommitdiff
path: root/tools/llvm-nm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-06 09:29:57 +0000
committerChris Lattner <sabre@nondot.org>2007-05-06 09:29:57 +0000
commit44dadffe4bd58ab32961ca5fe537e8ba69c09243 (patch)
tree745eccd4ec6ba93e89d8c2d992db470dbd025134 /tools/llvm-nm
parent4bcca0f2ac85c918fc8617e34b7642e5e5233460 (diff)
downloadllvm-44dadffe4bd58ab32961ca5fe537e8ba69c09243.tar.gz
llvm-44dadffe4bd58ab32961ca5fe537e8ba69c09243.tar.bz2
llvm-44dadffe4bd58ab32961ca5fe537e8ba69c09243.tar.xz
switch tools to bitcode instead of bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36868 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-nm')
-rw-r--r--tools/llvm-nm/Makefile2
-rw-r--r--tools/llvm-nm/llvm-nm.cpp17
2 files changed, 3 insertions, 16 deletions
diff --git a/tools/llvm-nm/Makefile b/tools/llvm-nm/Makefile
index 42233c7894..4af89174e3 100644
--- a/tools/llvm-nm/Makefile
+++ b/tools/llvm-nm/Makefile
@@ -9,6 +9,6 @@
LEVEL = ../..
TOOLNAME = llvm-nm
-LINK_COMPONENTS = archive bcreader bitreader
+LINK_COMPONENTS = archive bitreader
include $(LEVEL)/Makefile.common
diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp
index 5b98be7056..c4aa7baf43 100644
--- a/tools/llvm-nm/llvm-nm.cpp
+++ b/tools/llvm-nm/llvm-nm.cpp
@@ -18,8 +18,7 @@
#include "llvm/Module.h"
#include "llvm/Bitcode/ReaderWriter.h"
-#include "llvm/Bytecode/Reader.h"
-#include "llvm/Bytecode/Archive.h"
+#include "llvm/Bitcode/Archive.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
@@ -31,8 +30,6 @@
#include <iostream>
using namespace llvm;
-cl::opt<bool> Bitcode("bitcode");
-
namespace {
enum OutputFormatTy { bsd, sysv, posix };
cl::opt<OutputFormatTy>
@@ -125,17 +122,7 @@ static void DumpSymbolNamesFromFile(std::string &Filename) {
std::string ErrorMessage;
sys::Path aPath(Filename);
// Note: Currently we do not support reading an archive from stdin.
- if (Filename == "-" || aPath.isBytecodeFile()) {
- Module *Result = ParseBytecodeFile(Filename,
- Compressor::decompressToNewBuffer,
- &ErrorMessage);
- if (Result) {
- DumpSymbolNamesFromModule (Result);
- } else {
- std::cerr << ToolName << ": " << Filename << ": " << ErrorMessage << "\n";
- return;
- }
- } else if (aPath.isBitcodeFile()) {
+ if (Filename == "-" || aPath.isBitcodeFile()) {
std::auto_ptr<MemoryBuffer> Buffer(
MemoryBuffer::getFileOrSTDIN(&Filename[0], Filename.size()));
Module *Result = 0;