Remove dead code.

llvm-svn: 216152
This commit is contained in:
Rui Ueyama 2014-08-21 03:05:12 +00:00
parent 43e866a136
commit 5b6532fa49
3 changed files with 0 additions and 58 deletions

View File

@ -8,7 +8,6 @@
//===----------------------------------------------------------------------===//
#include "Atoms.h"
#include "ReaderImportHeader.h"
#include "lld/Core/Alias.h"
#include "lld/Core/File.h"
#include "lld/Driver/Driver.h"

View File

@ -310,30 +310,6 @@ public:
} // end anonymous namespace
namespace pecoff {
std::error_code
parseCOFFImportLibrary(const LinkingContext &targetInfo,
std::unique_ptr<MemoryBuffer> &mb,
std::vector<std::unique_ptr<File>> &result) {
// Check the file magic.
const char *buf = mb->getBufferStart();
const char *end = mb->getBufferEnd();
// Error if the file is too small or does not start with the magic.
if (end - buf < static_cast<ptrdiff_t>(sizeof(COFF::ImportHeader)) ||
memcmp(buf, "\0\0\xFF\xFF", 4))
return make_error_code(NativeReaderError::unknown_file_format);
std::error_code ec;
auto file = std::unique_ptr<File>(new FileImportLibrary(std::move(mb), ec));
if (ec)
return ec;
result.push_back(std::move(file));
return std::error_code();
}
} // end namespace pecoff
void Registry::addSupportCOFFImportLibraries() {
add(std::unique_ptr<Reader>(new COFFImportLibraryReader()));
}

View File

@ -1,33 +0,0 @@
//===- lib/ReaderWriter/PECOFF/ReaderImportHeader.h -----------------------===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLD_READER_WRITER_PE_COFF_READER_IMPORT_HEADER_H
#define LLD_READER_WRITER_PE_COFF_READER_IMPORT_HEADER_H
#include <memory>
#include <vector>
namespace llvm {
class MemoryBuffer;
}
namespace lld {
class LinkingContext;
class File;
namespace pecoff {
std::error_code
parseCOFFImportLibrary(const LinkingContext &context,
std::unique_ptr<MemoryBuffer> &mb,
std::vector<std::unique_ptr<File>> &result);
}
}
#endif