summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-01-13 19:48:18 +0000
committerHans Wennborg <hans@hanshq.net>2014-01-13 19:48:18 +0000
commit50501fbe38305b0753d6b8f853ab202bba2152df (patch)
tree5b69d464ef066a8efb0b69d3a8bf7dc37c279860 /clang
parent9125b08b523524581280896d66a010517b2d1d28 (diff)
downloadbcm5719-llvm-50501fbe38305b0753d6b8f853ab202bba2152df.tar.gz
bcm5719-llvm-50501fbe38305b0753d6b8f853ab202bba2152df.zip
Use the MS ABI for Win32 targets by default
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 llvm-svn: 199131
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index dc4aad74b94..131f5e8d94c 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1628,9 +1628,12 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) {
// 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,
OpenPOWER on IntegriCloud