[DebugInfo] Generate debug information for labels. (Fix PR37395)
authorHsiangkai Wang <hsiangkai@gmail.com>
Thu, 6 Sep 2018 06:03:36 +0000 (06:03 +0000)
committerHsiangkai Wang <hsiangkai@gmail.com>
Thu, 6 Sep 2018 06:03:36 +0000 (06:03 +0000)
commit0a875b2f15b1285d36d1d9ce92404f75bd10e99a
tree3b3fb143048c6ecc8166d0b8f4cf1dfcfd762c13
parent02f097e122cd7d83753e27c5ce0e6cd3c610eef4
[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.
After fixing problems in LiveDebugVariables.

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

llvm-svn: 341519
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]