summaryrefslogtreecommitdiff
path: root/tools/llvm-nm/llvm-nm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-nm/llvm-nm.cpp')
-rw-r--r--tools/llvm-nm/llvm-nm.cpp17
1 files changed, 2 insertions, 15 deletions
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;