]> granicus.if.org Git - llvm/commit
Fix for "DICompileUnit not listed in llvm.dbg.cu" verification error after ...
authorArtur Pilipenko <apilipenko@azulsystems.com>
Wed, 28 Aug 2019 21:27:50 +0000 (21:27 +0000)
committerArtur Pilipenko <apilipenko@azulsystems.com>
Wed, 28 Aug 2019 21:27:50 +0000 (21:27 +0000)
commitb98de8c76b8ce2fa9da4b4a6933542d5034ab3be
tree01079ce310d6d478f582c4ac6b2e126190aef5ea
parent0575f5892a280576f149f343c6d4a549399c7302
Fix for "DICompileUnit not listed in llvm.dbg.cu" verification error after ...

...cloning a function from a different module

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.

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

Reviewed By: aprantl, efriedma

Differential Revision: https://reviews.llvm.org/D66510

Patch by Oleg Pliss (Oleg.Pliss@azul.com)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370265 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/CloneFunction.cpp
lib/Transforms/Utils/CloneModule.cpp
unittests/Transforms/Utils/CloningTest.cpp