diff options
| author | 2017-01-24 08:32:59 +0000 | |
|---|---|---|
| committer | 2017-01-24 08:32:59 +0000 | |
| commit | 53d771aafdbe5b919f264f53cba3788e2c4cffd2 (patch) | |
| tree | 7eca39498be0ff1e3a6daf583cd9ca5886bb2636 /gnu/llvm/tools/lld/lib/Core/SymbolTable.cpp | |
| parent | In preparation of compiling our kernels with -ffreestanding, explicitly map (diff) | |
| download | wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.tar.xz wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.zip | |
Import LLVM 4.0.0 rc1 including clang and lld to help the current
development effort on OpenBSD/arm64.
Diffstat (limited to 'gnu/llvm/tools/lld/lib/Core/SymbolTable.cpp')
| -rw-r--r-- | gnu/llvm/tools/lld/lib/Core/SymbolTable.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/gnu/llvm/tools/lld/lib/Core/SymbolTable.cpp b/gnu/llvm/tools/lld/lib/Core/SymbolTable.cpp index 44631a5d40d..cacea5f3084 100644 --- a/gnu/llvm/tools/lld/lib/Core/SymbolTable.cpp +++ b/gnu/llvm/tools/lld/lib/Core/SymbolTable.cpp @@ -223,13 +223,9 @@ bool SymbolTable::AtomMappingInfo::isEqual(const DefinedAtom * const l, const DefinedAtom * const r) { if (l == r) return true; - if (l == getEmptyKey()) + if (l == getEmptyKey() || r == getEmptyKey()) return false; - if (r == getEmptyKey()) - return false; - if (l == getTombstoneKey()) - return false; - if (r == getTombstoneKey()) + if (l == getTombstoneKey() || r == getTombstoneKey()) return false; if (l->contentType() != r->contentType()) return false; @@ -265,17 +261,6 @@ const Atom *SymbolTable::findByName(StringRef sym) { return pos->second; } -bool SymbolTable::isDefined(StringRef sym) { - if (const Atom *atom = findByName(sym)) - return !isa<UndefinedAtom>(atom); - return false; -} - -void SymbolTable::addReplacement(const Atom *replaced, - const Atom *replacement) { - _replacedAtoms[replaced] = replacement; -} - const Atom *SymbolTable::replacement(const Atom *atom) { // Find the replacement for a given atom. Atoms in _replacedAtoms // may be chained, so find the last one. @@ -303,17 +288,4 @@ std::vector<const UndefinedAtom *> SymbolTable::undefines() { return ret; } -std::vector<StringRef> SymbolTable::tentativeDefinitions() { - std::vector<StringRef> ret; - for (auto entry : _nameTable) { - const Atom *atom = entry.second; - StringRef name = entry.first; - assert(atom != nullptr); - if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom)) - if (defAtom->merge() == DefinedAtom::mergeAsTentative) - ret.push_back(name); - } - return ret; -} - } // namespace lld |
