llvm.org GIT mirror llvm / ea6f05e
[dsymutil] Check AttrInfo.Name validity before using it Summary: This upstreams a patch from the osxcross [1] toolchain. It appears that llvm-dsymutil crashes at this place during GCC bootstrap. Adding the check here seems reasonable, since it operates on arbitrary input DWARF, not necessarily generated by the LLVM toolchain, and it seems the un-mangled name need not necessarily exist. Patch by Thomas Pöchtrager [1] https://github.com/tpoechtrager/osxcross Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D39336 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316678 91177308-0d34-0410-b5e6-96231b3b80d8 Keno Fischer 2 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
28772877 Tag == dwarf::DW_TAG_inlined_subroutine);
28782878 } else if (isTypeTag(Tag) && !AttrInfo.IsDeclaration &&
28792879 getDIENames(InputDIE, AttrInfo)) {
2880 Unit.addTypeAccelerator(Die, AttrInfo.Name, AttrInfo.NameOffset);
2880 if (AttrInfo.Name)
2881 Unit.addTypeAccelerator(Die, AttrInfo.Name, AttrInfo.NameOffset);
28812882 }
28822883
28832884 // Determine whether there are any children that we want to keep.