[PATCH] D66510: Fix for "DICompileUnit not listed in llvm.dbg.cu" verification error after cloning a function from a different module

Oleg Pliss via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 18:34:23 PDT 2019


OlegPliss created this revision.
OlegPliss added reviewers: sanjoy, efriedma, rtereshin, dexonsmith, apilipenko.
OlegPliss added a project: LLVM.
Herald added subscribers: llvm-commits, ormris, aprantl.

Currently when a function with debug info is cloned from a different module, the cloned function may have hanging DICompileUnits, so that the module with the cloned function fails debug info verification. For a simple example, please see the supplied CloneFunctionToDifferentModule test.

The proposed fix inserts all DICompileUnits reachable from the cloned function to "llvm.dbg.cu" metadata operands of the cloned function module. Duplication of operands is carefully avoided.


Repository:
  rL LLVM

https://reviews.llvm.org/D66510

Files:
  lib/Transforms/Utils/CloneFunction.cpp
  lib/Transforms/Utils/CloneModule.cpp
  unittests/Transforms/Utils/CloningTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66510.216306.patch
Type: text/x-patch
Size: 4072 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190821/3988cce9/attachment.bin>


More information about the llvm-commits mailing list