[clang] [clang][driver] Add \<executable\>/../include/c++/v1 to include path on Darwin (PR #70817)

Jon Roelofs via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 8 14:18:26 PST 2023


================
@@ -2494,6 +2494,19 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs(
                    << "\"\n";
     }
 
+    // Check for the folder where the executable is located, if different.
+    if (getDriver().getInstalledDir() != getDriver().Dir) {
+      InstallBin = llvm::StringRef(getDriver().Dir.c_str());
----------------
jroelofs wrote:

`StringRef` has a `const std::string&` constructor, so the `.c_str()` part is unnecessary. 

https://github.com/llvm/llvm-project/pull/70817


More information about the cfe-commits mailing list