diff options
| author | Eric Christopher <echristo@gmail.com> | 2016-12-14 18:29:39 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2016-12-14 18:29:39 +0000 |
| commit | ba1024cfb8a855f312a0ce113b31b452baa6bcee (patch) | |
| tree | 0c3f41c7bcdfb411567cf9bca5fd974a7a910c26 /llvm | |
| parent | 963f5490e2140547b217174c9a168a7d7c98978c (diff) | |
| download | bcm5719-llvm-ba1024cfb8a855f312a0ce113b31b452baa6bcee.tar.gz bcm5719-llvm-ba1024cfb8a855f312a0ce113b31b452baa6bcee.zip | |
This change does two things:
Adds a "Discriminator" field to struct DILineInfo, which defaults to 0.
Fills out the "Discriminator" field in DILineInfo in DWARFDebugLine::LineTable::getFileLineInfoForAddress().
in order to have a slightly nicer interface in getFileLineInfoForAddress.
Patch by Simon Que!
Differential Revision: https://reviews.llvm.org/D27649
llvm-svn: 289683
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/DebugInfo/DIContext.h | 6 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/llvm/include/llvm/DebugInfo/DIContext.h b/llvm/include/llvm/DebugInfo/DIContext.h index ed959caa699..804419c517d 100644 --- a/llvm/include/llvm/DebugInfo/DIContext.h +++ b/llvm/include/llvm/DebugInfo/DIContext.h @@ -35,8 +35,12 @@ struct DILineInfo { uint32_t Line; uint32_t Column; + // DWARF-specific. + uint32_t Discriminator; + DILineInfo() - : FileName("<invalid>"), FunctionName("<invalid>"), Line(0), Column(0) {} + : FileName("<invalid>"), FunctionName("<invalid>"), Line(0), Column(0), + Discriminator(0) {} bool operator==(const DILineInfo &RHS) const { return Line == RHS.Line && Column == RHS.Column && diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp index 1635808e002..494059461fd 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp @@ -678,5 +678,6 @@ bool DWARFDebugLine::LineTable::getFileLineInfoForAddress( return false; Result.Line = Row.Line; Result.Column = Row.Column; + Result.Discriminator = Row.Discriminator; return true; } |

