[ELF] Fix crash when an input is incompatible with a lazy object file
authorFangrui Song <i@maskray.me>
Sun, 6 Feb 2022 07:34:14 +0000 (23:34 -0800)
committerFangrui Song <i@maskray.me>
Sun, 6 Feb 2022 07:34:14 +0000 (23:34 -0800)
commitbad1b7fbb0fec532f097ac59805562020f895962
treebe9a4e6aefde5b8babdbf66552b34504dd59c7b1
parentb4626f22defa4046991caa146cbbf0e792b43e92
[ELF] Fix crash when an input is incompatible with a lazy object file

The diagnostic is concise. It is ok because the case is rare.
lld/ELF/InputFiles.cpp
lld/test/ELF/incompatible-ar-first.s