When verifying a basic block, keep track of the mapping between
!DILocalVariable fragments and addresses (typically stack slots). This
can help identify variables that are accidentally described as being in
two different stack slots.
Known check-llvm failures:
LLVM :: Transforms/Coroutines/coro-debug-frame-variable.ll LLVM :: Transforms/LoopVectorize/discriminator.ll
Could we ever see two dbg.declares for the same variable fragment with different expressions?
This is contrived and I don't have a reproducer, so I'm not sure if it is something worth considering. I was just reminded of PR41992 and PR43957 when I saw std::pair<DILocalVariable *, DIExpression *> being used to identify fragments of a variable.