[llvm] r244397 - Return early on error. Should fix the asan bots.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 8 07:54:11 PDT 2015


Author: rafael
Date: Sat Aug  8 09:54:09 2015
New Revision: 244397

URL: http://llvm.org/viewvc/llvm-project?rev=244397&view=rev
Log:
Return early on error. Should fix the asan bots.

Modified:
    llvm/trunk/include/llvm/Object/ELFObjectFile.h

Modified: llvm/trunk/include/llvm/Object/ELFObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELFObjectFile.h?rev=244397&r1=244396&r2=244397&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELFObjectFile.h (original)
+++ llvm/trunk/include/llvm/Object/ELFObjectFile.h Sat Aug  8 09:54:09 2015
@@ -737,6 +737,8 @@ ELFObjectFile<ELFT>::ELFObjectFile(Memor
           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: {




More information about the llvm-commits mailing list