@@ -35,10 +35,9 @@ static std::optional<Path> getActualModuleMapPath(
35
35
36
36
Path result;
37
37
38
- StringRef SDKPath = Opts.getSDKPath ();
39
- if (!SDKPath.empty ()) {
40
- result.append (SDKPath.begin (), SDKPath.end ());
41
- llvm::sys::path::append (result, " usr" , " lib" , " swift" );
38
+ if (!Opts.RuntimeResourcePath .empty ()) {
39
+ result.append (Opts.RuntimeResourcePath .begin (),
40
+ Opts.RuntimeResourcePath .end ());
42
41
llvm::sys::path::append (result, platform);
43
42
if (isArchSpecific) {
44
43
llvm::sys::path::append (result, arch);
@@ -52,10 +51,11 @@ static std::optional<Path> getActualModuleMapPath(
52
51
return result;
53
52
}
54
53
55
- if (!Opts.RuntimeResourcePath .empty ()) {
54
+ StringRef SDKPath = Opts.getSDKPath ();
55
+ if (!SDKPath.empty ()) {
56
56
result.clear ();
57
- result.append (Opts. RuntimeResourcePath . begin (),
58
- Opts. RuntimeResourcePath . end () );
57
+ result.append (SDKPath. begin (), SDKPath. end ());
58
+ llvm::sys::path::append (result, " usr " , " lib " , " swift " );
59
59
llvm::sys::path::append (result, platform);
60
60
if (isArchSpecific) {
61
61
llvm::sys::path::append (result, arch);
0 commit comments