[PATCH] D44187: Simplify LazyobjFile and readElfSymbols.
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 7 16:37:11 PST 2018
Rui Ueyama via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:
> -template <class ELFT> std::vector<StringRef> LazyObjFile::getElfSymbols() {
> - typedef typename ELFT::Shdr Elf_Shdr;
> - typedef typename ELFT::Sym Elf_Sym;
> - typedef typename ELFT::SymRange Elf_Sym_Range;
> +template <class ELFT> void LazyObjFile::addElfSymbols() {
> + StringRef ObjName = MB.getBufferIdentifier();
> + ELFFile<ELFT> Obj = check(ELFFile<ELFT>::create(MB.getBuffer()));
> + ArrayRef<typename ELFT::Shdr> Sections = CHECK(Obj.sections(), ObjName);
Why change CHECK(..., this) to CHECK(..., ObjName)?
LGTM with that.
Cheers,
Rafael
More information about the llvm-commits
mailing list