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
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.
-// 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}}