[cfe-commits] r111983 - in /cfe/trunk: include/clang/Driver/CC1Options.td include/clang/Frontend/PreprocessorOutputOptions.h lib/Driver/Tools.cpp lib/Frontend/CompilerInvocation.cpp lib/Frontend/PrintPreprocessedOutput.cpp test/Frontend/Inputs/ test/Frontend/Inputs/lit.local.cfg test/Frontend/Inputs/test.h test/Frontend/Inputs/test2.h test/Frontend/Inputs/test3.h test/Frontend/print-header-includes.c
Chris Lattner
clattner at apple.com
Fri Sep 3 09:49:45 PDT 2010
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?
-Chris
More information about the cfe-commits
mailing list