[PATCH] D33614: Cloning: Fix debug info cloning

Gor Nishanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 16:50:52 PDT 2017


GorNishanov created this revision.

I believe https://reviews.llvm.org/rL302576 introduced two bugs:

1. it produces tuplicate distinct variables for every: dbg.value describing the same variable. I added caching, but, it is not sufficient, since dbg.value may refer to various expressions representing the same user var, thus, switching form getDistinct to get is important.

2. It passes NewFunction plain name as a linkagename parameter to Subprogram constructor. Breaks assert in:

  || DeclLinkageName.empty()) || LinkageName == DeclLinkageName) && "decl has a linkage name and it is different"' failed.

#9 0x00007f5010261b75 llvm::DwarfUnit::applySubprogramDefinitionAttributes(llvm::DISubprogram const*, llvm::DIE&) /home/gor/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1173:3
#

I am going to add reproducers soon. Sending this out early to explain the problem


https://reviews.llvm.org/D33614

Files:
  lib/IR/DebugLoc.cpp
  lib/Transforms/Coroutines/CoroSplit.cpp
  lib/Transforms/Utils/CloneFunction.cpp
  test/Transforms/Coroutines/coro-debug.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33614.100498.patch
Type: text/x-patch
Size: 9612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170526/c612c00f/attachment.bin>


More information about the llvm-commits mailing list