mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
Remove the separate `DebugInfoVerifier` class, as a partial step toward better integrating debug info verification with the `Verifier`. Right now, verification of debug info is kind of a mess. - There are `DIDescriptor::Verify()` checks live in `DebugInfo.cpp`. These return `bool`, and there's no way to see (except by opening a debugger) why they fail. - We rely on `DebugInfoFinder` to traverse the debug info graph and dig up nodes. However, the regular `Verifier` visits many of these nodes when it calls into debug info intrinsic operands. Visiting twice and running different checks is kind of absurd. - Moreover, `DebugInfoFinder` asserts on failed type resolution -- the verifier should never assert! By integrating the two verifiers, I'm aiming at solving these problems (work to be done, obviously). Verification can be localized to the `Verifier`; we can use a naive `MDNode` operand traversal to find all the nodes; we can verify type references instead of asserting on failure. There are `assert()`s sprinkled throughout the optimizer and dwarf backend on `DIDescriptor::Verify()` checks. This is a hangover from when the debug info verifier was off, so I plan to remove them as I go (once I confirm that the checks are done at verification time). Note: to keep the behaviour of only running the debug info verifier when -verify succeeds, I've added an `EverBroken` flag. Once the `DebugInfoFinder` assertions are gone and the two traversals have been merged, I expect to be able to remove this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232790 91177308-0d34-0410-b5e6-96231b3b80d8