[llvm-commits] [llvm] r75790 - /llvm/trunk/include/llvm/System/Path.h

Chris Lattner clattner at apple.com
Wed Jul 15 15:21:11 PDT 2009


On Jul 15, 2009, at 3:17 PM, Dan Gohman wrote:
>>>> Is this really worthwhile?  This tightly couples sys::Path and
>>>>
>>>> raw_ostream.  Why can't the client just use toString?  The API for
>>>>
>>>> sys::Path is already significantly broken in a lot of ways, I'd  
>>>> like
>>>>
>>>> for it to not expand in scope.
>>>>
>>>
>>>
>>> Yes. It makes porting from std::ostream to raw_ostream easier, and
>>>
>>> it doesn't add any additional burden to the task of refactoring
>>>
>>> sys::Path.
>>>
>>
>> Ok, I guess I was mostly opposed to adding the #include of  
>> raw_ostream
>> to Path.h in the short-term.  Can we at least avoid that?
>
> I actually tried putting the operator<< definition in Path.cpp, but
> that adds a dependency from libLLVMSystem to libLLVMSupport, forming
> a cycle. Is there a specific problem here?

*sigh*, don't worry about it I guess.  I still don't understand why "x  
<< mypath" is so much more compelling than "x << mypath.toString()" :)


-Chris



More information about the llvm-commits mailing list