[PATCH] Turn local DWARFContext helpers getFileNameForUnit() and getFileLineInfoForCompileUnit() into full-blowm DWARFDebugLine::LineTable methods.

Frederic Riss friss at apple.com
Mon Sep 15 06:30:28 PDT 2014


Hi dblaikie, echristo, aprantl, samsonov,

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.

http://reviews.llvm.org/D5354

Files:
  lib/DebugInfo/DWARFContext.cpp
  lib/DebugInfo/DWARFDebugLine.cpp
  lib/DebugInfo/DWARFDebugLine.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5354.13706.patch
Type: text/x-patch
Size: 7872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140915/41e4d43a/attachment.bin>


More information about the llvm-commits mailing list