This addresses PR21035. For now, we are unable to represent the
possibility of jumping between asm IR blocks in LLVM, so these kinds of
jumps don't play well with the SSA model. This patch adds a diagnostic
that detect those kinds of jumps, based on the information that the LLVM
side patch exposes from MC.
Note that we currently lose the SourceLocation for the branch statement
and the label definition statement, so the diagnostic is at inline
assembly block granularity. This issue will be addressed in a
follow-up.
At a high level, I feel like we shouldn't need this map. It basically reinvents the label name lookup that sema is already performing for us.
What if we changed LabelDecl to hold an MSAsmStmt*? Conceptually, we could make TheStmt be a Stmt* and getStmt() could be 'return dyn_cast_or_null<LabelStmt>(TheStmt);'.