[llvm] [clang] [clang-tools-extra] [DebugInfo][RemoveDIs] Don't allocate one DPMarker per instruction (PR #79345)

Jeremy Morse via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 5 10:04:54 PST 2024


jmorse wrote:

(Note that I've merged main into this branch for various reasons,)

I've adjusted `adoptDbgValues` to always clean up the `DPMarker` that it adopts, so that there's no return value for people to accidentally miss. This means that we have to test in `adoptDbgValues` whether we're adopting something from a trailing-DPMarker position, and clean that up too, rather than relying on the caller to do that.

(I suppose this is a classic case of premature optimisation)

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


More information about the cfe-commits mailing list