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

Björn Pettersson via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 25 05:20:55 PDT 2025


bjope wrote:

> I have never considered loop properties to be recursive. Recursive MDNodes cannot be uniqued[1](#user-content-fn-1-4a187b3c741ca8c19ca894811d3b10b2) and hence I would avoid creating them. Clang does not create them. I would not require handling those in this PR, it can be fixed when there is a use case for such metadata. But a TODO comment could be helpful for anyone encountering an endless recursion here. If you decide to add handling for such nodes, be sure to add a test case since otherwise it will bitrot.
> 

Thanks for the help and the review!

I've added a TODO for now. The pre-commit checks seems to be struggling a bit, but I  think that will resolve itself after some rebasing against main...

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


More information about the llvm-commits mailing list