summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Symbols.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Symbols.h')
-rw-r--r--lld/ELF/Symbols.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h
index 47dea9af181..abbfa26cc13 100644
--- a/lld/ELF/Symbols.h
+++ b/lld/ELF/Symbols.h
@@ -45,7 +45,6 @@ public:
DefinedRegularKind = DefinedFirst,
SharedKind,
DefinedCommonKind,
- DefinedBitcodeKind,
DefinedSyntheticKind,
DefinedLast = DefinedSyntheticKind,
UndefinedKind,
@@ -159,14 +158,6 @@ public:
static bool classof(const SymbolBody *S) { return S->isDefined(); }
};
-// The defined symbol in LLVM bitcode files.
-class DefinedBitcode : public Defined {
-public:
- DefinedBitcode(StringRef Name, uint8_t StOther, uint8_t Type, BitcodeFile *F);
- static bool classof(const SymbolBody *S);
- BitcodeFile *file() { return (BitcodeFile *)this->File; }
-};
-
template <class ELFT> class DefinedCommon : public Defined {
public:
DefinedCommon(StringRef N, uint64_t Size, uint64_t Alignment, uint8_t StOther,
@@ -217,6 +208,12 @@ public:
llvm::ELF::STT_NOTYPE),
Value(0), Size(0), Section(NullInputSection) {}
+ DefinedRegular(StringRef Name, uint8_t StOther, uint8_t Type, BitcodeFile *F)
+ : Defined(SymbolBody::DefinedRegularKind, Name, StOther, Type), Value(0),
+ Size(0), Section(NullInputSection) {
+ this->File = F;
+ }
+
static bool classof(const SymbolBody *S) {
return S->kind() == SymbolBody::DefinedRegularKind;
}
@@ -439,11 +436,11 @@ struct Symbol {
// large and aligned enough to store any derived class of SymbolBody. We
// assume that the size and alignment of ELF64LE symbols is sufficient for any
// ELFT, and we verify this with the static_asserts in replaceBody.
- llvm::AlignedCharArrayUnion<
- DefinedBitcode, DefinedCommon<llvm::object::ELF64LE>,
- DefinedRegular<llvm::object::ELF64LE>,
- DefinedSynthetic<llvm::object::ELF64LE>, Undefined,
- SharedSymbol<llvm::object::ELF64LE>, LazyArchive, LazyObject>
+ llvm::AlignedCharArrayUnion<DefinedCommon<llvm::object::ELF64LE>,
+ DefinedRegular<llvm::object::ELF64LE>,
+ DefinedSynthetic<llvm::object::ELF64LE>,
+ Undefined, SharedSymbol<llvm::object::ELF64LE>,
+ LazyArchive, LazyObject>
Body;
SymbolBody *body() { return reinterpret_cast<SymbolBody *>(Body.buffer); }
OpenPOWER on IntegriCloud