[PATCH] D155818: [CloneFunction][DebugInfo] Clone DISubprogram's local types

Vladislav Dzhidzhoev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 05:14:55 PDT 2023


dzhidzhoev created this revision.
dzhidzhoev added reviewers: aprantl, dblaikie, jdoerfert, dexonsmith, rnk.
Herald added a subscriber: hiraditya.
Herald added a project: All.
dzhidzhoev requested review of this revision.
Herald added subscribers: llvm-commits, wangpc.
Herald added a project: LLVM.

When DISubprogram is being cloned, types belonging to its scope
must be cloned too. Otherwise, function-local types of the original
function are used in the cloned one, which may cause conflicts.

Additionally, when tracking function-local types in the DISubprogram
(via retainedTypes or enums fields), it seems reasonable to track
the clones as well.

It helps to tackle the crash encountered after committing
https://reviews.llvm.org/D144006.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155818

Files:
  llvm/include/llvm/IR/DebugInfo.h
  llvm/lib/IR/DebugInfo.cpp
  llvm/lib/Transforms/Utils/CloneFunction.cpp
  llvm/unittests/Transforms/Utils/CloningTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155818.542439.patch
Type: text/x-patch
Size: 9372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230720/3af24633/attachment-0001.bin>


More information about the llvm-commits mailing list