On Fri, Sep 3, 2010 at 9:49 AM, Chris Lattner <[email protected]> wrote:
>
> On Aug 24, 2010, at 3:44 PM, Daniel Dunbar wrote:
>
>> Author: ddunbar
>> Date: Tue Aug 24 17:44:13 2010
>> New Revision: 111983
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=111983&view=rev
>> Log:
>> Frontend: Add basic -H support.
>
> cool.
>
>> +  // Dump the header include information, if enabled and we are past the
>> +  // predefines buffer.
>> +  if (DumpHeaderIncludes && HasProcessedPredefines &&
>> +      Reason == PPCallbacks::EnterFile) {
>> +    llvm::SmallString<256> Msg;
>> +    llvm::raw_svector_ostream OS(Msg);
>> +    for (unsigned i = 0; i != CurrentIncludeDepth; ++i)
>> +      OS << '.';
>> +    OS << ' ' << CurFilename << '\n';
>> +    llvm::errs() << OS.str();
>
> Why the temporary SmallString?

It writes on llvm::errs() directly, which has horrible buffering
behavior. I didn't want to be flushing out one character at a time. A
generally solution to this problem would make more sense, but there
aren't so many places that output substantial text to stderr.

 - Daniel

> -Chris
>
>

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to