[cfe-commits] r140009 - /cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Francois Pichet
pichet2000 at gmail.com
Sun Sep 18 22:15:54 PDT 2011
Author: fpichet
Date: Mon Sep 19 00:15:54 2011
New Revision: 140009
URL: http://llvm.org/viewvc/llvm-project?rev=140009&view=rev
Log:
Do not use builtin includes if -fms-compatibility is specified. Some MSVC header files have the same name as clang's builtins, this creates clash.
Modified:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=140009&r1=140008&r2=140009&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Mon Sep 19 00:15:54 2011
@@ -1373,7 +1373,8 @@
using namespace cc1options;
Opts.Sysroot = Args.getLastArgValue(OPT_isysroot, "/");
Opts.Verbose = Args.hasArg(OPT_v);
- Opts.UseBuiltinIncludes = !Args.hasArg(OPT_nobuiltininc);
+ Opts.UseBuiltinIncludes = !Args.hasArg(OPT_nobuiltininc) &&
+ !Args.hasArg(OPT_fms_compatibility);
Opts.UseStandardIncludes = !Args.hasArg(OPT_nostdinc);
Opts.UseStandardCXXIncludes = !Args.hasArg(OPT_nostdincxx);
if (const Arg *A = Args.getLastArg(OPT_stdlib_EQ))
More information about the cfe-commits
mailing list