forked from OSchip/llvm-project
Convert a call to check to checkLazy.
Linking clang goes from 300.82MB to 292.68MB allocated. llvm-svn: 319926
This commit is contained in:
parent
c221dc71b1
commit
5b491a29fb
|
@ -520,13 +520,14 @@ InputSectionBase *ObjFile<ELFT>::createInputSection(const Elf_Shdr &Sec) {
|
|||
|
||||
size_t NumRelocations;
|
||||
if (Sec.sh_type == SHT_RELA) {
|
||||
ArrayRef<Elf_Rela> Rels =
|
||||
check(this->getObj().relas(&Sec), toString(this));
|
||||
ArrayRef<Elf_Rela> Rels = checkLazy(this->getObj().relas(&Sec),
|
||||
[=]() { return toString(this); });
|
||||
Target->FirstRelocation = Rels.begin();
|
||||
NumRelocations = Rels.size();
|
||||
Target->AreRelocsRela = true;
|
||||
} else {
|
||||
ArrayRef<Elf_Rel> Rels = check(this->getObj().rels(&Sec), toString(this));
|
||||
ArrayRef<Elf_Rel> Rels = checkLazy(this->getObj().rels(&Sec),
|
||||
[=]() { return toString(this); });
|
||||
Target->FirstRelocation = Rels.begin();
|
||||
NumRelocations = Rels.size();
|
||||
Target->AreRelocsRela = false;
|
||||
|
|
Loading…
Reference in New Issue