Revert "[Driver] Use -fuse-line-directives by default in MSVC mode"

This reverts commit SVN r331666.

It was afterwards pointed out in https://reviews.llvm.org/D46520
that #line directives lose information about what parts come from a
system header. That means the result of -E usually won't compile,
since Windows headers are typically full of warnings and
default-error warnings.

llvm-svn: 331858
This commit is contained in:
Martin Storsjo 2018-05-09 09:11:01 +00:00
parent 8b4bc76a23
commit f1f8f4a1fd
2 changed files with 2 additions and 3 deletions

View File

@ -4224,9 +4224,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
IsWindowsMSVC))
CmdArgs.push_back("-fms-extensions");
// -fno-use-line-directives is default, except for MSVC targets.
// -fno-use-line-directives is default.
if (Args.hasFlag(options::OPT_fuse_line_directives,
options::OPT_fno_use_line_directives, IsWindowsMSVC))
options::OPT_fno_use_line_directives, false))
CmdArgs.push_back("-fuse-line-directives");
// -fms-compatibility=0 is default.

View File

@ -28,7 +28,6 @@
// RUN: %clang_cl /E -### -- %s 2>&1 | FileCheck -check-prefix=E %s
// E: "-E"
// E: "-fuse-line-directives"
// E: "-o" "-"
// RUN: %clang_cl /EP -### -- %s 2>&1 | FileCheck -check-prefix=EP %s