summaryrefslogtreecommitdiffstats
path: root/lld/COFF/InputFiles.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/COFF/InputFiles.h')
-rw-r--r--lld/COFF/InputFiles.h37
1 files changed, 2 insertions, 35 deletions
diff --git a/lld/COFF/InputFiles.h b/lld/COFF/InputFiles.h
index 108a4caacd6..d822685dc86 100644
--- a/lld/COFF/InputFiles.h
+++ b/lld/COFF/InputFiles.h
@@ -14,7 +14,6 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
-#include "llvm/BinaryFormat/Magic.h"
#include "llvm/DebugInfo/CodeView/TypeRecord.h"
#include "llvm/LTO/LTO.h"
#include "llvm/Object/Archive.h"
@@ -56,13 +55,7 @@ class TpiSource;
// The root class of input files.
class InputFile {
public:
- enum Kind {
- ArchiveKind,
- ObjectKind,
- LazyObjectKind,
- ImportKind,
- BitcodeKind
- };
+ enum Kind { ArchiveKind, ObjectKind, ImportKind, BitcodeKind };
Kind kind() const { return fileKind; }
virtual ~InputFile() {}
@@ -109,28 +102,10 @@ private:
llvm::DenseSet<uint64_t> seen;
};
-// .obj or .o file between -start-lib and -end-lib.
-class LazyObjFile : public InputFile {
-public:
- explicit LazyObjFile(MemoryBufferRef m) : InputFile(LazyObjectKind, m) {}
- static bool classof(const InputFile *f) {
- return f->kind() == LazyObjectKind;
- }
- // Makes this object file part of the link.
- void fetch();
- // Adds the symbols in this file to the symbol table as LazyObject symbols.
- void parse() override;
-
-private:
- std::vector<Symbol *> symbols;
-};
-
// .obj or .o file. This may be a member of an archive file.
class ObjFile : public InputFile {
public:
explicit ObjFile(MemoryBufferRef m) : InputFile(ObjectKind, m) {}
- explicit ObjFile(MemoryBufferRef m, std::vector<Symbol *> &&symbols)
- : InputFile(ObjectKind, m), symbols(std::move(symbols)) {}
static bool classof(const InputFile *f) { return f->kind() == ObjectKind; }
void parse() override;
MachineTypes getMachineType() override;
@@ -326,11 +301,7 @@ public:
class BitcodeFile : public InputFile {
public:
BitcodeFile(MemoryBufferRef mb, StringRef archiveName,
- uint64_t offsetInArchive)
- : BitcodeFile(mb, archiveName, offsetInArchive, {}) {}
- explicit BitcodeFile(MemoryBufferRef m, StringRef archiveName,
- uint64_t offsetInArchive,
- std::vector<Symbol *> &&symbols);
+ uint64_t offsetInArchive);
static bool classof(const InputFile *f) { return f->kind() == BitcodeKind; }
ArrayRef<Symbol *> getSymbols() { return symbols; }
MachineTypes getMachineType() override;
@@ -343,10 +314,6 @@ private:
std::vector<Symbol *> symbols;
};
-inline bool isBitcode(MemoryBufferRef mb) {
- return identify_magic(mb.getBuffer()) == llvm::file_magic::bitcode;
-}
-
std::string replaceThinLTOSuffix(StringRef path);
} // namespace coff
OpenPOWER on IntegriCloud