[PATCH] D39336: [dsymutil] Check AttrInfo.Name validity before using it

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 10:31:58 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL316678: [dsymutil] Check AttrInfo.Name validity before using it (authored by kfischer).

Repository:
  rL LLVM

https://reviews.llvm.org/D39336

Files:
  llvm/trunk/tools/dsymutil/DwarfLinker.cpp


Index: llvm/trunk/tools/dsymutil/DwarfLinker.cpp
===================================================================
--- llvm/trunk/tools/dsymutil/DwarfLinker.cpp
+++ llvm/trunk/tools/dsymutil/DwarfLinker.cpp
@@ -2878,7 +2878,8 @@
                               Tag == dwarf::DW_TAG_inlined_subroutine);
   } else if (isTypeTag(Tag) && !AttrInfo.IsDeclaration &&
              getDIENames(InputDIE, AttrInfo)) {
-    Unit.addTypeAccelerator(Die, AttrInfo.Name, AttrInfo.NameOffset);
+    if (AttrInfo.Name)
+      Unit.addTypeAccelerator(Die, AttrInfo.Name, AttrInfo.NameOffset);
   }
 
   // Determine whether there are any children that we want to keep.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39336.120448.patch
Type: text/x-patch
Size: 656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171026/e0bac859/attachment.bin>


More information about the llvm-commits mailing list