File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -2257,12 +2257,14 @@ ModuleLibraryLevelRequest::evaluate(Evaluator &evaluator,
2257
2257
const ModuleDecl *module ) const {
2258
2258
auto &ctx = module ->getASTContext ();
2259
2259
2260
- // / Is \p path from System/Library/PrivateFrameworks/?
2261
- auto fromPrivateFrameworks = [&](StringRef path) -> bool {
2262
- auto sep = llvm::sys::path::get_separator ();
2263
- auto privateFrameworksPath = llvm::Twine (ctx.SearchPathOpts .SDKPath ) +
2264
- sep + " System" + sep + " Library" + sep + " PrivateFrameworks" + sep;
2265
- return hasPrefix (path, privateFrameworksPath.str ());
2260
+ // / Is \p modulePath from System/Library/PrivateFrameworks/?
2261
+ auto fromPrivateFrameworks = [&](StringRef modulePath) -> bool {
2262
+ namespace path = llvm::sys::path;
2263
+ SmallString<128 > scratch;
2264
+ scratch = ctx.SearchPathOpts .SDKPath ;
2265
+ path::append (scratch, " System" , " Library" , " PrivateFrameworks" );
2266
+ return hasPrefix (path::begin (modulePath), path::end (modulePath),
2267
+ path::begin (scratch), path::end (scratch));
2266
2268
};
2267
2269
2268
2270
if (module ->isNonSwiftModule ()) {
You can’t perform that action at this time.
0 commit comments