mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 04:56:06 +00:00

This restores the functionality of AsmPrinterHandlers to what it was prior to https://github.com/llvm/llvm-project/pull/96785. The attempted hack there of adding a duplicate DebugHandlerBase handling added a lot of hidden state and assumptions, which just segfaulted when we tried to continuing using this API. Instead, this just goes back to the old design, but adds a separate array for the basic EH handles. The duplicate array is identical to the other array of handler, but which doesn't get their begin/endInstruction callbacks called. This still saves the negligible but measurable amount of virtual function calls as was the goal of #96785, while restoring the API to the pre-LLVM-19 status quo.