In addition to being a sensible default, this is a huge improvement
in test coverage for the MS ABI: any bot that targets Win32 will
now run the test suite using the MS ABI by default.
Differential Revision: http://llvm-reviews.chandlerc.com/D2401
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199131
91177308-0d34-0410-b5e6-
96231b3b80d8
// Use the default target triple if unspecified.
if (Opts.Triple.empty())
Opts.Triple = llvm::sys::getDefaultTargetTriple();
-}
-//
+ // Use the MS ABI for Win32 targets unless otherwise specified.
+ if (Opts.CXXABI.empty() &&
+ llvm::Triple(Opts.Triple).getOS() == llvm::Triple::Win32)
+ Opts.CXXABI = "microsoft";
+}
bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
const char *const *ArgBegin,