[cfe-commits] [patch] Expose HeaderSearch::SearchDirs to tools

Paul Holden Paul at mediamolecule.com
Fri Feb 18 06:45:32 PST 2011


Hello,

I was hoping to get some feedback on the attached patch.

I've been working on fixing a couple of bugs in the recently-released
'include-what-you-use' tool
(http://code.google.com/p/include-what-you-use/).

One thing we need to be able to do is enumerate the search paths which
the preprocessor was initialised with. My current solution relies on
enumerating the paths stored in HeaderSearch::SearchDirs.
Unfortunately this doesn't appear to be exposed in any way, and that's
that the attached patch does.

I suppose it's a little contentious as it breaks the encapsulation
that HeaderSearch achieves. An alternative approach would be to add
functionality to HeaderSearch which takes an absolute path, and
returns a matching DirectoryLookup. If that sounds like a better plan
then I'll try it out and submit another patch for review.

Regards,
Paul

________________________________

Please consider the environment before printing this email :-)

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately then delete this email. Any views expressed in this email are solely that of the individual and not representative of the company as a whole.

Media Molecule Limited
Company Reg No 5665849
Registered in England.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang_expose_system_dirs.patch
Type: application/octet-stream
Size: 875 bytes
Desc: clang_expose_system_dirs.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110218/077fdd3c/attachment.obj>


More information about the cfe-commits mailing list