[Type Uniquing Patch] Modify functions in DebugInfo.h to take an extra map argument.

Manman Ren mren at apple.com
Tue Jul 9 09:48:58 PDT 2013


Modify access functions that can return a DIType to take an extra map argument.
Add helper function
+  void collectDITypeHashMap(const NamedMDNode *CU_Nodes, DITypeHashMap &Map);
to update DITypeHashMap by going through RetainedTypes of each CU.
Testing cases are added to verify llvm-link can correctly unique types if the input .ll files use string instead of DIType.

To make sure we can dump MDNode comments even without a DITypeHashMap, isDebugInfo is used instead of
Verify in WriteMDNodeComment. Neither is accurate for checking whether MDNode is indeed debug info.

Thanks,
Manman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: type_unique_di.patch
Type: application/octet-stream
Size: 47669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130709/bfbeda14/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: type_unique_test.patch
Type: application/octet-stream
Size: 229452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130709/bfbeda14/attachment-0001.obj>


More information about the llvm-commits mailing list