================
@@ -150,3 +150,23 @@ clang::parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS,
StringRef SDKRootPath) {
return llvm::make_error<llvm::StringError>("invalid SDKSettings.json",
llvm::inconvertibleErrorCode());
}
+
+// For certain platforms/environments almost all resources (e.g., headers) are
+// located in sub-directories, e.g., for DriverKit they live in
+// <SYSROOT>/System/DriverKit/usr/include (instead of <SYSROOT>/usr/include).
+StringRef clang::getSystemPrefix(const llvm::Triple &T) {
+ if (T.isDriverKit())
+ return "/System/DriverKit";
+ return "";
+}
+
+KnownSystemPaths clang::getCommonSystemPaths(llvm::Triple T) {
----------------
ldionne wrote:
I feel like this function might be slightly misnamed, unless I don't properly
understand its purpose. `getCommonSystemPaths` is a very general name, but in
reality this seems to only return the framework paths. As currently named, this
makes it seem as though we could potentially return header paths, library
paths, framework paths, etc.
If this will only ever return framework paths, perhaps a name like
`getCommonSystemFrameworkPaths` would be better?
https://github.com/llvm/llvm-project/pull/118543
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits