From: Tim Northover Date: Mon, 15 Feb 2016 16:38:10 +0000 (+0000) Subject: Darwin: fix stdlib handling when CLANG_DEFAULT_STDLIB is set X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb4f0f8444fa15596e76e9b182b64b52f1b62227;p=clang Darwin: fix stdlib handling when CLANG_DEFAULT_STDLIB is set I'd accidentally skipped the CMake check in a premature optimisation. I'd also put the original test in completely the wrong place. Thanks Jonas Hahnfeld! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260898 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index ae24e4731b..6c5cdb2759 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1060,7 +1060,7 @@ DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args, } if (!Args.getLastArg(options::OPT_stdlib_EQ) && - GetDefaultCXXStdlibType() == ToolChain::CST_Libcxx) + GetCXXStdlibType(Args) == ToolChain::CST_Libcxx) DAL->AddJoinedArg(nullptr, Opts.getOption(options::OPT_stdlib_EQ), "libc++"); diff --git a/darwin-stdlib.cpp b/test/Driver/darwin-stdlib.cpp similarity index 100% rename from darwin-stdlib.cpp rename to test/Driver/darwin-stdlib.cpp