================
@@ -745,29 +767,33 @@ void HexagonToolChain::AddClangSystemIncludeArgs(const 
ArgList &DriverArgs,
   }
 }
 
-void HexagonToolChain::addLibCxxIncludePaths(
-    const llvm::opt::ArgList &DriverArgs,
-    llvm::opt::ArgStringList &CC1Args) const {
-  SmallString<128> Dir;
-  getBaseIncludeDir(Dir);
-  llvm::sys::path::append(Dir, "c++", "v1");
-  addLibStdCXXIncludePaths(Dir, "", "", DriverArgs, CC1Args);
-}
+void HexagonToolChain::AddClangCXXStdlibIncludeArgs(
+    const ArgList &DriverArgs, ArgStringList &CC1Args) const {
+  if (DriverArgs.hasArg(options::OPT_nostdinc, options::OPT_nostdlibinc,
+                        options::OPT_nostdincxx))
+    return;
 
-void HexagonToolChain::addLibStdCxxIncludePaths(
-    const llvm::opt::ArgList &DriverArgs,
-    llvm::opt::ArgStringList &CC1Args) const {
   SmallString<128> Dir;
-  getBaseIncludeDir(Dir);
-  llvm::sys::path::append(Dir, "c++");
-  addLibStdCXXIncludePaths(Dir, "", "", DriverArgs, CC1Args);
+  getBaseIncludeDir(DriverArgs, Dir);
+
+  CXXStdlibType Type = GetCXXStdlibType(DriverArgs);
+  switch (Type) {
+  case ToolChain::CST_Libcxx:
+    llvm::sys::path::append(Dir, "c++", "v1");
+    addSystemInclude(DriverArgs, CC1Args, Dir);
+    break;
+  case ToolChain::CST_Libstdcxx:
+    llvm::sys::path::append(Dir, "c++");
+    addSystemInclude(DriverArgs, CC1Args, Dir);
+    break;
+  }
----------------
quic-k wrote:

right, failing test was the only reason
looks like I need to add the new include empty paths in 
clang/Driver/test/Inputs for the tests to work

https://github.com/llvm/llvm-project/pull/183257
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to