summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/SymbolTable.cpp4
-rw-r--r--lld/ELF/Symbols.cpp4
-rw-r--r--lld/ELF/Symbols.h6
3 files changed, 7 insertions, 7 deletions
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp
index cfce3d94ddd..aeaf97ed644 100644
--- a/lld/ELF/SymbolTable.cpp
+++ b/lld/ELF/SymbolTable.cpp
@@ -434,7 +434,7 @@ void SymbolTable<ELFT>::addLazyArchive(
bool WasInserted;
std::tie(S, WasInserted) = insert(Sym.getName());
if (WasInserted) {
- replaceBody<LazyArchive>(S, F, Sym, SymbolBody::UnknownType);
+ replaceBody<LazyArchive>(S, *F, Sym, SymbolBody::UnknownType);
return;
}
if (!S->body()->isUndefined())
@@ -448,7 +448,7 @@ void SymbolTable<ELFT>::addLazyArchive(
// this symbol as used when we added it to the symbol table, but we also need
// to preserve its type. FIXME: Move the Type field to Symbol.
if (S->isWeak()) {
- replaceBody<LazyArchive>(S, F, Sym, S->body()->Type);
+ replaceBody<LazyArchive>(S, *F, Sym, S->body()->Type);
return;
}
MemoryBufferRef MBRef = F->getMember(&Sym);
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index 2f7749ffc65..ce905490a77 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -221,13 +221,13 @@ std::unique_ptr<InputFile> Lazy::getFile() {
}
std::unique_ptr<InputFile> LazyArchive::getFile() {
- MemoryBufferRef MBRef = File->getMember(&Sym);
+ MemoryBufferRef MBRef = File.getMember(&Sym);
// getMember returns an empty buffer if the member was already
// read from the library.
if (MBRef.getBuffer().empty())
return std::unique_ptr<InputFile>(nullptr);
- return createObjectFile(MBRef, File->getName());
+ return createObjectFile(MBRef, File.getName());
}
std::unique_ptr<InputFile> LazyObject::getFile() {
diff --git a/lld/ELF/Symbols.h b/lld/ELF/Symbols.h
index 2b6908dcebd..6d5eb4668a9 100644
--- a/lld/ELF/Symbols.h
+++ b/lld/ELF/Symbols.h
@@ -332,9 +332,9 @@ public:
// LazyArchive symbols represents symbols in archive files.
class LazyArchive : public Lazy {
public:
- LazyArchive(ArchiveFile *F, const llvm::object::Archive::Symbol S,
+ LazyArchive(ArchiveFile &File, const llvm::object::Archive::Symbol S,
uint8_t Type)
- : Lazy(LazyArchiveKind, S.getName(), Type), File(F), Sym(S) {}
+ : Lazy(LazyArchiveKind, S.getName(), Type), File(File), Sym(S) {}
static bool classof(const SymbolBody *S) {
return S->kind() == LazyArchiveKind;
@@ -343,7 +343,7 @@ public:
std::unique_ptr<InputFile> getFile();
private:
- ArchiveFile *File;
+ ArchiveFile &File;
const llvm::object::Archive::Symbol Sym;
};
OpenPOWER on IntegriCloud