[DebugInfo]: Allow DwarfCompileUnit to have line table symbol
authorSourabh Singh Tomar <SourabhSingh.Tomar@amd.com>
Sat, 4 Apr 2020 19:29:11 +0000 (00:59 +0530)
committerSourabh Singh Tomar <SourabhSingh.Tomar@amd.com>
Sun, 5 Apr 2020 18:44:29 +0000 (00:14 +0530)
commit0d71782f4e29784873080571f7aebd5bdd163f3f
tree8075a85602a58c7d8711749cc1bed144afafbe56
parent96eb38418bcc2e11f9b991629231451dc8c19555
[DebugInfo]: Allow DwarfCompileUnit to have line table symbol

Previously line table symbol was represented as `DIE::value_iterator`
inside `DwarfCompileUnit` and subsequent function `intStmtList`
was used to create a local `MCSymbol` to initialize it.

This patch removes `DIE::value_iterator` from `DwarfCompileUnit`
and intoduce `MCSymbol` for representing this units symbol for
`debug_line` section. As a result `applyStmtList` is also modified
 to utilize this. Further more a helper function `getLineTableStartSym`
is also introduced to get this symbol, this would be used by clients
which need to access this line table, i.e `debug_macro`.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D77489
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h