[cfe-commits] r67256 - /cfe/trunk/lib/Driver/Tools.cpp

Chris Lattner clattner at apple.com
Wed Mar 18 22:43:55 PDT 2009


On Mar 18, 2009, at 10:42 PM, Daniel Dunbar wrote:

> On Wed, Mar 18, 2009 at 9:46 PM, Chris Lattner <clattner at apple.com>  
> wrote:
> On Mar 18, 2009, at 4:34 PM, Daniel Dunbar wrote:
>
> Author: ddunbar
> Date: Wed Mar 18 18:34:15 2009
> New Revision: 67256
>
> URL: http://llvm.org/viewvc/llvm-project?rev=67256&view=rev
> Log:
> Driver: Resolve program path for "cp" (used as part of transparent gcc
> PCH support).
>
> Does the driver really need to run cp?  Why can't it copy files  
> itself?
>
> No; this is a hack which I hope to get rid of, I just haven't  
> investigated how important it is. In general the driver should not  
> make new files the user didn't request; for now this is a convenient  
> hack which allows transparent PTH support, however.
>
> That said, if we are copying the file, calling cp isn't the worst  
> thing in the world and exposes the driver's actions to the user.

Ok, I'm fine with it being a short term thing.  It can be replaced as  
an "optimization" later if it is found to be important.

> Do we have a robust copy file implementation?
> ddunbar at frank:~$ wc -l ~/public/coreutils-6.10/src/cp.c
> 1118 /home/ddunbar/public/coreutils-6.10/src/cp.c

No, not yet, but it should be possible in less code than that ;-)

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090318/107dabe9/attachment.html>


More information about the cfe-commits mailing list