[PATCH] D34909: Driver: consume -nostdinc++ along with -nostdinc
Dave Lee via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 30 14:17:12 PDT 2017
kastiglione created this revision.
Using both -nostdinc and -nostdinc++ should not emit diagnostics.
https://reviews.llvm.org/D34909
Files:
lib/Driver/ToolChains/CrossWindows.cpp
test/Driver/windows-cross.c
Index: test/Driver/windows-cross.c
===================================================================
--- test/Driver/windows-cross.c
+++ test/Driver/windows-cross.c
@@ -85,3 +85,7 @@
// CHECK-NOSTDINC-ISYSTEM-AFTER: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
// CHECK-NOSTDINC-ISYSTEM-AFTER-NOT: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include"
// CHECK-NOSTDINC-ISYSTEM-AFTER: "-internal-isystem" "Windows Kits{{[/\\]}}10{{[/\\]}}Include{{[/\\]}}10.0.10586.0{{[/\\]}}ucrt"
+
+// RUN: %clang -### -target armv7-windows-itanium -nostdinc -nostdinc++ -x c++ -c %s -o /dev/null 2>&1 \
+// RUN: | FileCheck %s --check-prefix CHECK-NOSTDINC-NOSTDINCXX
+// CHECK-NOSTDINC-NOSTDINCXX-NOT: argument unused during compilation: '-nostdinc++'
Index: lib/Driver/ToolChains/CrossWindows.cpp
===================================================================
--- lib/Driver/ToolChains/CrossWindows.cpp
+++ lib/Driver/ToolChains/CrossWindows.cpp
@@ -264,8 +264,7 @@
const llvm::Triple &Triple = getTriple();
const std::string &SysRoot = getDriver().SysRoot;
- if (DriverArgs.hasArg(options::OPT_nostdinc) ||
- DriverArgs.hasArg(options::OPT_nostdincxx))
+ if (DriverArgs.hasArg(options::OPT_nostdinc, options::OPT_nostdincxx))
return;
switch (GetCXXStdlibType(DriverArgs)) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34909.104933.patch
Type: text/x-patch
Size: 1302 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170630/57ec7bb1/attachment-0001.bin>
More information about the cfe-commits
mailing list