{PATCH] clang::tooling::ArgumentAdjuster - Add file name argument to Adjust callback

Thompson, John John_Thompson at playstation.sony.com
Mon Aug 12 06:16:32 PDT 2013


This patch adds an input file name parameter to ArgumentAdjuster's Adjust function in Tooling, in order to allow support of changes to a compile's arguments based on the file name.

I'm in a testing phase for a new feature for modularize which allows you to add dependencies to the header files in the input header list.  In using modularize for a real-world set of headers, I found that some headers needed other headers to be included first, as opposed to including them themselves or relying on a master header to include the subset of headers in the right order.  With this patch, I can create an ArgumentAdjuster derivation that's given a map with the dependencies keyed on the file name, and have the Adjust function look up the dependencies using the input file name and then add -include options to first include the depended-on headers.  This seemed easier than other changes or derivations that would need to be done.

Thanks.

-John


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130812/4d93ecac/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ArgumentAdjustersPatchClang.txt
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130812/4d93ecac/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ArgumentAdjustersPatchExtra.txt
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130812/4d93ecac/attachment-0001.txt>


More information about the cfe-commits mailing list