[DebugInfo] Generate debug information for labels. (Fix PR37395)
authorShiva Chen <shiva0217@gmail.com>
Tue, 24 Jul 2018 02:23:59 +0000 (02:23 +0000)
committerShiva Chen <shiva0217@gmail.com>
Tue, 24 Jul 2018 02:23:59 +0000 (02:23 +0000)
commitc50fbb9da70255c08cec72e272429bcb3040d272
treee71fe8b4991ae217e27138d93636d446cd6a8fa5
parentd6b2cdf9d4053ade22ad58379df7d12389ba3d1b
[DebugInfo] Generate debug information for labels. (Fix PR37395)

Generate DILabel metadata and call llvm.dbg.label after label
statement to associate the metadata with the label.

After fixing PR37395.

Differential Revision: https://reviews.llvm.org/D45045

Patch by Hsiangkai Wang.

llvm-svn: 337800
clang/lib/CodeGen/CGDebugInfo.cpp
clang/lib/CodeGen/CGDebugInfo.h
clang/lib/CodeGen/CGStmt.cpp
clang/test/CodeGen/debug-label-inline.c [new file with mode: 0644]
clang/test/CodeGen/debug-label.c [new file with mode: 0644]