[Sema] Only look for PrivateFrameworks on Darwin

This commit is contained in:
Alexis Laferrière
2021-03-26 15:27:16 -07:00
parent f1f015c7dc
commit 6bbb9f04da
2 changed files with 3 additions and 0 deletions

View File

@@ -2259,6 +2259,8 @@ ModuleLibraryLevelRequest::evaluate(Evaluator &evaluator,
/// Is \p modulePath from System/Library/PrivateFrameworks/?
auto fromPrivateFrameworks = [&](StringRef modulePath) -> bool {
if (!ctx.LangOpts.Target.isOSDarwin()) return false;
namespace path = llvm::sys::path;
SmallString<128> scratch;
scratch = ctx.SearchPathOpts.SDKPath;