[PATCH] D143984: [DebugMetadata] Simplify handling subprogram's retainedNodes field. NFCI (1/7)

Kristina Bessonova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 7 01:57:36 PST 2023


krisb marked an inline comment as done.
krisb added inline comments.


================
Comment at: llvm/include/llvm/IR/DIBuilder.h:76
 
-    /// Each subprogram's preserved labels.
-    DenseMap<MDNode *, SmallVector<TrackingMDNodeRef, 1>> PreservedLabels;
+    SmallVectorImpl<TrackingMDNodeRef> &
+    getSubprogramNodesTrackingVector(const DIScope *S) {
----------------
aprantl wrote:
> Do you need a writeable copy, or could you get by with returning an `ArrayRef<TrackingMDNodeRef>`?
It should return smth suitable to emplace new elements, so, right, we need a writable reference here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143984/new/

https://reviews.llvm.org/D143984



More information about the cfe-commits mailing list