[llvm] [DebugInfo] Handle followup loop metadata in updateLoopMetadataDebugLocations (PR #157557)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 23 10:36:45 PDT 2025


================
@@ -375,6 +375,32 @@ bool DebugInfoFinder::addScope(DIScope *Scope) {
   return true;
 }
 
+// Recursively handle DILocations in followup metadata etc.
+static Metadata *updateLoopMetadataDebugLocationsRecursive(
+    Metadata *MetadataIn, function_ref<Metadata *(Metadata *)> Updater) {
+  const MDNode *M = dyn_cast_or_null<MDNode>(MetadataIn);
----------------
SLTozer wrote:

Minor detail, but I think this should probably be `MDTuple` rather than `MDNode` - we're already implicitly assuming an `MDTuple` when we choose to replace it with `MDNode::get` below, so better to make that explicit.

https://github.com/llvm/llvm-project/pull/157557


More information about the llvm-commits mailing list