diff options
author | Nico Weber <nicolasweber@gmx.de> | 2012-08-30 02:08:31 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2012-08-30 02:08:31 +0000 |
commit | 50f88b99c60c2ed31b339cd8bd484766cc9e916b (patch) | |
tree | 8f0093cfe8497e4f9a9b3139083e690017db2e52 /lib/Driver/Tools.cpp | |
parent | 566698851d76416129cd20ceea02bdd697934c5c (diff) |
Reland r160052: Default to -std=c++11 on Windows.
Also update the tests that rely on c++98 to explicitly mention that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index c113406670..3c46e34ac7 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2141,8 +2141,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // eventually we want to do all the standard defaulting here instead of // splitting it between the driver and clang -cc1. if (!types::isCXX(InputType)) - Args.AddAllArgsTranslated(CmdArgs, options::OPT_std_default_EQ, - "-std=", /*Joined=*/true); + Args.AddAllArgsTranslated(CmdArgs, options::OPT_std_default_EQ, + "-std=", /*Joined=*/true); + else if (getToolChain().getTriple().getOS() == llvm::Triple::Win32) + CmdArgs.push_back("-std=c++11"); + Args.AddLastArg(CmdArgs, options::OPT_trigraphs); } |