[PATCH] D25233: [ELF] - Do not crash when unable to parse ELF object file.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 09:25:46 PDT 2016


ruiu added inline comments.


> InputFiles.cpp:73-74
>      : InputFile(K, MB), ELFObj(createELFObj<ELFT>(MB)) {
> +  if (HasError)
> +    return;
>    EKind = getELFKind<ELFT>();

This seems very weird. HasError should be used at major checkpoints, and we shouldn't have so many checkpoints. It is on the other hand called for every instantiation of the class.

https://reviews.llvm.org/D25233





More information about the llvm-commits mailing list