[DebugInfo] don't make an MDTuple just to leak it
authorJameson Nash <vtjnash@gmail.com>
Tue, 4 Apr 2023 11:42:25 +0000 (07:42 -0400)
committerJameson Nash <vtjnash@gmail.com>
Tue, 4 Apr 2023 12:01:47 +0000 (08:01 -0400)
commit9eda46b1817f60378143846477ef71f0131a121d
tree86ec589d3da17fde502d1a2eac9357a95d0aed52
parentb2f5ab6a41e32bfd8151225b6032ca869f4e142f
[DebugInfo] don't make an MDTuple just to leak it

There does not seem to be any purpose to allocating this object, which
is Metadata, so LLVM will simply leak it until the context is destroyed
(the subprogram metadata it contains are distinct, so there is little
chance of it being reused later). This should not have a functional
change.

This seems to be left over from an earlier design, when it used to call
```
CUNode->replaceSubprograms(SPs.get());
```
here also. (removed in http://reviews.llvm.org/D19034)

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D147469
llvm/include/llvm/IR/DIBuilder.h
llvm/lib/IR/DIBuilder.cpp