// Also check whether this is used for setting library search paths.
ToolChain::AddClangCXXStdlibIncludeArgs(DriverArgs, CC1Args);
- if (DriverArgs.hasArg(options::OPT_nostdlibinc) ||
- DriverArgs.hasArg(options::OPT_nostdincxx))
+ if (DriverArgs.hasArg(options::OPT_nostdinc, options::OPT_nostdlibinc,
+ options::OPT_nostdincxx))
return;
llvm::SmallString<128> Sysroot = GetEffectiveSysroot(DriverArgs);
void toolchains::MinGW::AddClangCXXStdlibIncludeArgs(
const ArgList &DriverArgs, ArgStringList &CC1Args) const {
- if (DriverArgs.hasArg(options::OPT_nostdlibinc) ||
- DriverArgs.hasArg(options::OPT_nostdincxx))
+ if (DriverArgs.hasArg(options::OPT_nostdinc, options::OPT_nostdlibinc,
+ options::OPT_nostdincxx))
return;
StringRef Slash = llvm::sys::path::get_separator();
// CHECK-LIBCXX-SYSROOT_AND_TOOLCHAIN-1: "-internal-isystem" "[[TOOLCHAIN]]/usr/bin/../include/c++/v1"
// CHECK-LIBCXX-SYSROOT_AND_TOOLCHAIN-1-NOT: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1"
-// Make sure that using -nostdinc does not drop any C++ library include path.
-// This behavior is strange, but it is compatible with the legacy CC1 behavior.
-//
-// RUN: %clang -### %s -fsyntax-only 2>&1 \
-// RUN: --target=x86_64-apple-darwin16 \
-// RUN: -ccc-install-dir %S/Inputs/basic_darwin_toolchain/usr/bin \
-// RUN: -resource-dir=%S/Inputs/resource_dir \
-// RUN: -isysroot %S/Inputs/basic_darwin_sdk_usr_cxx_v1 \
-// RUN: -stdlib=platform \
-// RUN: -nostdinc \
-// RUN: | FileCheck -DSYSROOT=%S/Inputs/basic_darwin_sdk_usr_cxx_v1 \
-// RUN: -DTOOLCHAIN=%S/Inputs/basic_darwin_toolchain \
-// RUN: --check-prefix=CHECK-LIBCXX-NOSTDINC-1 %s
-// CHECK-LIBCXX-NOSTDINC-1: "-cc1"
-// CHECK-LIBCXX-NOSTDINC-1-NOT: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1"
-// CHECK-LIBCXX-NOSTDINC-1: "-internal-isystem" "[[TOOLCHAIN]]/usr/bin/../include/c++/v1"
+// Make sure that using -nostdinc, -nostdinc++ or -nostdlib will drop both the toolchain
+// C++ include path and the sysroot one.
//
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=x86_64-apple-darwin16 \
// RUN: -ccc-install-dir %S/Inputs/basic_darwin_toolchain/usr/bin \
// RUN: -resource-dir=%S/Inputs/resource_dir \
-// RUN: -isysroot %S/Inputs/basic_darwin_sdk_no_libcxx \
+// RUN: -isysroot %S/Inputs/basic_darwin_sdk_usr \
// RUN: -stdlib=platform \
// RUN: -nostdinc \
-// RUN: | FileCheck -DSYSROOT=%S/Inputs/basic_darwin_sdk_no_libcxx \
+// RUN: | FileCheck -DSYSROOT=%S/Inputs/basic_darwin_sdk_usr \
// RUN: -DTOOLCHAIN=%S/Inputs/basic_darwin_toolchain \
-// RUN: --check-prefix=CHECK-LIBCXX-NOSTDINC-2 %s
-// CHECK-LIBCXX-NOSTDINC-2: "-cc1"
-// CHECK-LIBCXX-NOSTDINC-2: "-internal-isystem" "[[TOOLCHAIN]]/usr/bin/../include/c++/v1"
-// CHECK-LIBCXX-NOSTDINC-2-NOT: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1"
-
-// Make sure that using -nostdinc++ or -nostdlib will drop both the toolchain
-// C++ include path and the sysroot one.
+// RUN: --check-prefix=CHECK-LIBCXX-NOSTDLIBINC %s
+// CHECK-LIBCXX-NOSTDINC: "-cc1"
+// CHECK-LIBCXX-NOSTDINC-NOT: "-internal-isystem" "[[TOOLCHAIN]]/usr/bin/../include/c++/v1"
+// CHECK-LIBCXX-NOSTDINC-NOT: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1"
//
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=x86_64-apple-darwin16 \
// RUN: not %clangxx -nostdinc++ %s 2>&1 | FileCheck %s
// RUN: not %clangxx -nostdlibinc %s 2>&1 | FileCheck %s
// RUN: not %clangxx --target=x86_64-unknown-unknown-gnu -fsyntax-only -nostdinc -nostdinc++ %s 2>&1 | FileCheck /dev/null --implicit-check-not=-Wunused-command-line-argument
-// CHECK: file not found
-#include <vector>
+// CHECK: 'vector' file not found
+#include <vector>
// MSVC, PS4, PS5 have C++ headers in the same directory as C headers.
// UNSUPPORTED: ms-sdk, ps4, ps5