[cfe-dev] C++11 migration tools

Chris Lattner clattner at apple.com
Mon Jul 2 11:05:48 PDT 2012


On Jul 2, 2012, at 11:00 AM, Douglas Gregor wrote:

>>> 
>>> Because that tool wouldn't have any focus. A "C++11 migrator" is something we can rally behind as a useful tool with an obvious scope, as is an "Objective-C modernizer". But a generic source migrator is an abstraction with no obvious usefulness or scope.
>>> 
>>> Obviously, these two tools will share nearly all of their infrastructure, except for the actual migration rules. And, in doing so, we'll demonstrate how best to create your own source-to-source translation tool.
>> 
>> I'm specifically thinking that they should be the same *executable* - of course they'd be different "tools" with different audiences.  The interface to the two tools should be virtually identical.  Why is it better to have an array of similar tools (that do different rewrites) as an array of executables instead of as a single executable with a mode switch?
> 
> 
> Because different users want different tools. The two language migrators presumably aren't the only tools that would go into this side repository; should the eventual code-reformatting tool go into the same executable as well? Are you looking to optimize for build time here, or is there some other reason?

I'm trying to find the right level of abstraction here.   A similar argument could be that we should have one tool for each static analyzer checker, because some users would want one but not all checks.  What is the downside of having all the rewriters be in the same tool?

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120702/1b67d675/attachment.html>


More information about the cfe-dev mailing list