[PATCH] D147469: [DebugInfo] don't make an MDTuple just to leak it
Jameson Nash via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 05:02:49 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9eda46b1817f: [DebugInfo] don't make an MDTuple just to leak it (authored by vtjnash).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147469/new/
https://reviews.llvm.org/D147469
Files:
llvm/include/llvm/IR/DIBuilder.h
llvm/lib/IR/DIBuilder.cpp
Index: llvm/lib/IR/DIBuilder.cpp
===================================================================
--- llvm/lib/IR/DIBuilder.cpp
+++ llvm/lib/IR/DIBuilder.cpp
@@ -96,8 +96,7 @@
if (!RetainValues.empty())
CUNode->replaceRetainedTypes(MDTuple::get(VMContext, RetainValues));
- DISubprogramArray SPs = MDTuple::get(VMContext, AllSubprograms);
- for (auto *SP : SPs)
+ for (auto *SP : AllSubprograms)
finalizeSubprogram(SP);
for (auto *N : RetainValues)
if (auto *SP = dyn_cast<DISubprogram>(N))
Index: llvm/include/llvm/IR/DIBuilder.h
===================================================================
--- llvm/include/llvm/IR/DIBuilder.h
+++ llvm/include/llvm/IR/DIBuilder.h
@@ -52,7 +52,7 @@
SmallVector<TrackingMDNodeRef, 4> AllEnumTypes;
/// Track the RetainTypes, since they can be updated later on.
SmallVector<TrackingMDNodeRef, 4> AllRetainTypes;
- SmallVector<Metadata *, 4> AllSubprograms;
+ SmallVector<DISubprogram *, 4> AllSubprograms;
SmallVector<Metadata *, 4> AllGVs;
SmallVector<TrackingMDNodeRef, 4> AllImportedModules;
/// Map Macro parent (which can be DIMacroFile or nullptr) to a list of
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147469.510749.patch
Type: text/x-patch
Size: 1172 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230404/5f41d8a8/attachment.bin>
More information about the llvm-commits
mailing list