r212383 - clang-cl: /showIncludes output should go to stdout, not stderr. Fixes PR20217.
Nico Weber
nicolasweber at gmx.de
Sat Jul 5 20:04:27 PDT 2014
Author: nico
Date: Sat Jul 5 22:04:24 2014
New Revision: 212383
URL: http://llvm.org/viewvc/llvm-project?rev=212383&view=rev
Log:
clang-cl: /showIncludes output should go to stdout, not stderr. Fixes PR20217.
Modified:
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/lib/Frontend/HeaderIncludeGen.cpp
cfe/trunk/test/Frontend/print-header-includes.c
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=212383&r1=212382&r2=212383&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Sat Jul 5 22:04:24 2014
@@ -230,7 +230,7 @@ def module_file_deps : Flag<["-"], "modu
def header_include_file : Separate<["-"], "header-include-file">,
HelpText<"Filename (or -) to write header include output to">;
def show_includes : Flag<["--"], "show-includes">,
- HelpText<"Print cl.exe style /showIncludes to stderr">;
+ HelpText<"Print cl.exe style /showIncludes to stdout">;
//===----------------------------------------------------------------------===//
// Diagnostic Options
Modified: cfe/trunk/lib/Frontend/HeaderIncludeGen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/HeaderIncludeGen.cpp?rev=212383&r1=212382&r2=212383&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/HeaderIncludeGen.cpp (original)
+++ cfe/trunk/lib/Frontend/HeaderIncludeGen.cpp Sat Jul 5 22:04:24 2014
@@ -49,7 +49,7 @@ public:
void clang::AttachHeaderIncludeGen(Preprocessor &PP, bool ShowAllHeaders,
StringRef OutputPath, bool ShowDepth,
bool MSStyle) {
- raw_ostream *OutputFile = &llvm::errs();
+ raw_ostream *OutputFile = MSStyle ? &llvm::outs() : &llvm::errs();
bool OwnsOutputFile = false;
// Open the output file, if used.
Modified: cfe/trunk/test/Frontend/print-header-includes.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/print-header-includes.c?rev=212383&r1=212382&r2=212383&view=diff
==============================================================================
--- cfe/trunk/test/Frontend/print-header-includes.c (original)
+++ cfe/trunk/test/Frontend/print-header-includes.c Sat Jul 5 22:04:24 2014
@@ -1,12 +1,12 @@
-// RUN: %clang_cc1 -include Inputs/test3.h -E -H -o %t.out %s 2> %t.err
-// RUN: FileCheck < %t.err %s
+// RUN: %clang_cc1 -include Inputs/test3.h -E -H -o %t.out %s 2> %t.stderr
+// RUN: FileCheck < %t.stderr %s
// CHECK-NOT: test3.h
// CHECK: . {{.*test.h}}
// CHECK: .. {{.*test2.h}}
-// RUN: %clang_cc1 -include Inputs/test3.h -E --show-includes -o %t.out %s 2> %t.err
-// RUN: FileCheck --check-prefix=MS < %t.err %s
+// RUN: %clang_cc1 -include Inputs/test3.h -E --show-includes -o %t.out %s > %t.stdout
+// RUN: FileCheck --check-prefix=MS < %t.stdout %s
// MS-NOT: test3.h
// MS: Note: including file: {{.*test.h}}
// MS: Note: including file: {{.*test2.h}}
More information about the cfe-commits
mailing list