forked from OSchip/llvm-project
Return early on error. Should fix the asan bots.
llvm-svn: 244397
This commit is contained in:
parent
cb1f601a7b
commit
2935227fb4
|
@ -737,6 +737,8 @@ ELFObjectFile<ELFT>::ELFObjectFile(MemoryBufferRef Object, std::error_code &EC)
|
||||||
getELFType(ELFT::TargetEndianness == support::little, ELFT::Is64Bits),
|
getELFType(ELFT::TargetEndianness == support::little, ELFT::Is64Bits),
|
||||||
Object),
|
Object),
|
||||||
EF(Data.getBuffer(), EC) {
|
EF(Data.getBuffer(), EC) {
|
||||||
|
if (EC)
|
||||||
|
return;
|
||||||
for (const Elf_Shdr &Sec : EF.sections()) {
|
for (const Elf_Shdr &Sec : EF.sections()) {
|
||||||
switch (Sec.sh_type) {
|
switch (Sec.sh_type) {
|
||||||
case ELF::SHT_DYNSYM: {
|
case ELF::SHT_DYNSYM: {
|
||||||
|
|
Loading…
Reference in New Issue