forked from OSchip/llvm-project
Inline two trivial functions that are called only once. NFC.
llvm-svn: 329034
This commit is contained in:
parent
64521bed0d
commit
7d6131a898
|
@ -213,21 +213,18 @@ InputFile *Lazy::fetch() {
|
|||
return cast<LazyObject>(this)->fetch();
|
||||
}
|
||||
|
||||
ArchiveFile &LazyArchive::getFile() { return *cast<ArchiveFile>(File); }
|
||||
|
||||
InputFile *LazyArchive::fetch() {
|
||||
std::pair<MemoryBufferRef, uint64_t> MBInfo = getFile().getMember(&Sym);
|
||||
auto *F = cast<ArchiveFile>(File);
|
||||
std::pair<MemoryBufferRef, uint64_t> MBInfo = F->getMember(&Sym);
|
||||
|
||||
// getMember returns an empty buffer if the member was already
|
||||
// read from the library.
|
||||
if (MBInfo.first.getBuffer().empty())
|
||||
return nullptr;
|
||||
return createObjectFile(MBInfo.first, getFile().getName(), MBInfo.second);
|
||||
return createObjectFile(MBInfo.first, F->getName(), MBInfo.second);
|
||||
}
|
||||
|
||||
LazyObjFile &LazyObject::getFile() { return *cast<LazyObjFile>(File); }
|
||||
|
||||
InputFile *LazyObject::fetch() { return getFile().fetch(); }
|
||||
InputFile *LazyObject::fetch() { return cast<LazyObjFile>(File)->fetch(); }
|
||||
|
||||
uint8_t Symbol::computeBinding() const {
|
||||
if (Config->Relocatable)
|
||||
|
|
|
@ -283,7 +283,6 @@ public:
|
|||
|
||||
static bool classof(const Symbol *S) { return S->kind() == LazyArchiveKind; }
|
||||
|
||||
ArchiveFile &getFile();
|
||||
InputFile *fetch();
|
||||
|
||||
private:
|
||||
|
@ -299,7 +298,6 @@ public:
|
|||
|
||||
static bool classof(const Symbol *S) { return S->kind() == LazyObjectKind; }
|
||||
|
||||
LazyObjFile &getFile();
|
||||
InputFile *fetch();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue