summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-format
diff options
context:
space:
mode:
authorDimitry Andric <dimitry@andric.com>2017-06-06 21:54:21 +0000
committerDimitry Andric <dimitry@andric.com>2017-06-06 21:54:21 +0000
commit81c40421fe27319f8150446051aa89707262a0e3 (patch)
treec654362f26be046bba2fdf92aae2bc91b1681136 /clang/tools/clang-format
parentbc3feaaa884021ee3d76b70a3a2a2617eb261148 (diff)
downloadbcm5719-llvm-81c40421fe27319f8150446051aa89707262a0e3.tar.gz
bcm5719-llvm-81c40421fe27319f8150446051aa89707262a0e3.zip
Print registered targets in clang's version information
Summary: Other llvm tools display their registered targets when showing version information, but for some reason clang has never done this. To support this, D33899 adds the llvm parts, which make it possible to print version information to arbitrary raw_ostreams. This change adds a call to printRegisteredTargetsForVersion in clang's PrintVersion, and adds a raw_ostream parameter to two other PrintVersion functions. Reviewers: beanz, chandlerc, dberris, mehdi_amini, zturner Reviewed By: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33900 llvm-svn: 304836
Diffstat (limited to 'clang/tools/clang-format')
-rw-r--r--clang/tools/clang-format/ClangFormat.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/tools/clang-format/ClangFormat.cpp b/clang/tools/clang-format/ClangFormat.cpp
index 14bff19a1a0..f8e2fe186b9 100644
--- a/clang/tools/clang-format/ClangFormat.cpp
+++ b/clang/tools/clang-format/ClangFormat.cpp
@@ -328,8 +328,7 @@ static bool format(StringRef FileName) {
} // namespace format
} // namespace clang
-static void PrintVersion() {
- raw_ostream &OS = outs();
+static void PrintVersion(raw_ostream &OS) {
OS << clang::getClangToolFullVersion("clang-format") << '\n';
}
OpenPOWER on IntegriCloud