[PATCH] Make CloneFunction also clone debug info metadata

Mishne, Alon alon.mishne at intel.com
Thu Jan 2 07:44:50 PST 2014


Right now CloneFunction ignores the debug info metadata, which can lead to debug info loss when the cloned function is used. This patch modifies that so that if the 'ModuleLevelChanges' parameter to CloneFunction is true, any debug info metadata for the old function is cloned for the new function.

Also expanded the cloning unit tests to test for this new functionality.

Additionally, one of my tests required checking for an empty DIArray, but apparently DIBuilder doesn't make those - if asked to create an empty array, it creates an array with a single "null" value instead. I've changed DIBuilder to no longer do that because I don't understand why it's done and all the tests still pass after the change.
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140102/4a62dbd4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clone-debug-info.patch
Type: application/octet-stream
Size: 10086 bytes
Desc: clone-debug-info.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140102/4a62dbd4/attachment.obj>


More information about the llvm-commits mailing list