Return early on error. Should fix the asan bots.

llvm-svn: 244397
This commit is contained in:
Rafael Espindola 2015-08-08 14:54:09 +00:00
parent cb1f601a7b
commit 2935227fb4
1 changed files with 2 additions and 0 deletions

View File

@ -737,6 +737,8 @@ ELFObjectFile<ELFT>::ELFObjectFile(MemoryBufferRef Object, std::error_code &EC)
getELFType(ELFT::TargetEndianness == support::little, ELFT::Is64Bits),
Object),
EF(Data.getBuffer(), EC) {
if (EC)
return;
for (const Elf_Shdr &Sec : EF.sections()) {
switch (Sec.sh_type) {
case ELF::SHT_DYNSYM: {