[PATCH] D33899: Allow VersionPrinter to print to arbitrary raw_ostreams

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 09:48:09 PDT 2017


dim created this revision.

I would like to add printing of registered targets to clang's version
information.  For this to work correctly, the VersionPrinter logic in
CommandLine.cpp should support printing to arbitrary raw_ostreams,
instead of always defaulting to outs().

Add a raw_ostream& parameter to the function pointer type used for
VersionPrinter, and while doing so, introduce a typedef for convenience.

Note that VersionPrinter::print() will still default to using outs(),
the clang part will necessarily go into a separate review.


https://reviews.llvm.org/D33899

Files:
  include/llvm/Support/CommandLine.h
  include/llvm/Support/TargetRegistry.h
  lib/Support/CommandLine.cpp
  lib/Support/TargetRegistry.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33899.101422.patch
Type: text/x-patch
Size: 4923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170605/6dd5647a/attachment.bin>


More information about the llvm-commits mailing list