llvm/lib/DebugInfo
Frederic Riss b9f4e7d6e9 Turn local DWARFContext helpers getFileNameForUnit() and getFileLineInfoForCompileUnit() into full-blowm DWARFDebugLine::LineTable methods.
Summary:
getFileNameForUnit() is basically a wrapper around LineTable::getFileNameByIndex().
Fold its additional functionality (adding the DWARFUnit compilation dir) into
LineTable::getFileNameByIndex().

getFileLineInfoForCompileUnit() is a wrapper around getFileNameForUnit(). As
a function to search the line information by address, it seems natural to put
it in the LineTable also.

Before this commit only the Context with its private helpers could do Linetable
lookups. This newly exposed feature will be used by the DIE dumping code to
get access to file information referenced in DIE attributes.

This commit has already been partly reviewed in D5192 and contained an
additional and a bit controversial 'realpath' call that is left out of this
patch. We can reinstate that realpath code later if it is desirable.

Test Plan:
The patch contains no tests as it should be functionally equivalent to the
previous code. As requested in the last review, I checked if the relative
path handling copied from the Context to LineTable::getFileNameByIndex()
was covered, and indeed the symbolizer tests fail if it is removed.

Reviewers: dblaikie, echristo, aprantl, samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5354

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218125 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-19 15:11:51 +00:00
..
CMakeLists.txt
DIContext.cpp Use a reference instead of a pointer. 2014-07-31 20:19:36 +00:00
DWARFAbbreviationDeclaration.cpp
DWARFAbbreviationDeclaration.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFCompileUnit.cpp
DWARFCompileUnit.h Introduce the DWARFUnitSection abstraction. 2014-09-15 07:50:27 +00:00
DWARFContext.cpp Turn local DWARFContext helpers getFileNameForUnit() and getFileLineInfoForCompileUnit() into full-blowm DWARFDebugLine::LineTable methods. 2014-09-19 15:11:51 +00:00
DWARFContext.h Introduce the DWARFUnitSection abstraction. 2014-09-15 07:50:27 +00:00
DWARFDebugAbbrev.cpp
DWARFDebugAbbrev.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugAranges.cpp
DWARFDebugAranges.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugArangeSet.cpp
DWARFDebugArangeSet.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugFrame.cpp
DWARFDebugFrame.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugInfoEntry.cpp [dwarfdump] Dump DW_AT_(decl|call)_line attribute values as decimal values. 2014-09-05 07:21:50 +00:00
DWARFDebugInfoEntry.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugLine.cpp Turn local DWARFContext helpers getFileNameForUnit() and getFileLineInfoForCompileUnit() into full-blowm DWARFDebugLine::LineTable methods. 2014-09-19 15:11:51 +00:00
DWARFDebugLine.h Turn local DWARFContext helpers getFileNameForUnit() and getFileLineInfoForCompileUnit() into full-blowm DWARFDebugLine::LineTable methods. 2014-09-19 15:11:51 +00:00
DWARFDebugLoc.cpp
DWARFDebugLoc.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFDebugRangeList.cpp
DWARFDebugRangeList.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFFormValue.cpp Fix build faliure introduced by r217129. 2014-09-04 06:35:09 +00:00
DWARFRelocMap.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DWARFTypeUnit.cpp
DWARFTypeUnit.h Introduce the DWARFUnitSection abstraction. 2014-09-15 07:50:27 +00:00
DWARFUnit.cpp Introduce the DWARFUnitSection abstraction. 2014-09-15 07:50:27 +00:00
DWARFUnit.h Fix DWARFUnitSection::getUnitForOffset(). 2014-09-18 09:38:15 +00:00
LLVMBuild.txt
Makefile
module.modulemap