You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CloneFunction][DebugInfo] Ensure DILocalVariables of inlined functions are not cloned (NFC)
This change was separated from llvm#119001.
When cloning functions, use IdentityMDPredicate to ensure that
if DISubprogram is not cloned, then its DILocalVariables are not cloned
either.
This is expected to be an NFC currently, as DILocalVariables only reference
their subprograms (via DILocalScopes) and types.
Since inlined DISubprograms and DITypes are not cloned during the process,
DILocalVariables are mapped to self in ValueMapper (in mapTopLevelUniquedNode).
However, it will be needed for the original PR llvm#119001,
where it is possible that the type of a DILocalVariable is cloned
if it lies in the scope of a DISubprogram that is being cloned,
whereas the DILocalVariable itself belongs to a different DISubprogram.
I'm making this change into a separate PR to make the original PR a bit smaller,
and since this has more to do with variables than with types.
0 commit comments