Generate DILabel metadata and call llvm.dbg.label after label statement to associate the metadata with the label. This patch should be reviewed with D45024.
|3644 ↗||(On Diff #140248)|
|535 ↗||(On Diff #140248)|
I assume you emit debug info for the label only if it's reachable by checking HaveInsertPoint(). If so, make the comment as
// Emit debug info for the label only if it's reachable.
I prefer adding braces here. Please check indent as well.
This broke the Chromium build. I've uploaded a reproducer at https://bugs.chromium.org/p/chromium/issues/detail?id=841170#c1
I'm guessing maybe a Clang bootstrap with debug info might also reproduce the problem, but I haven't tried that.
Reverted in r331861.