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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289683 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2016-12-14 18:29:39 +00:00
parent e209ab4879
commit 07325396c0
2 changed files with 6 additions and 1 deletions

View File

@ -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 &&

View File

@ -678,5 +678,6 @@ bool DWARFDebugLine::LineTable::getFileLineInfoForAddress(
return false;
Result.Line = Row.Line;
Result.Column = Row.Column;
Result.Discriminator = Row.Discriminator;
return true;
}