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