Skip to content

Commit 506aa1d

Browse files
authored
Merge pull request #32930 from slavapestov/simplify-legacy-type-info
IRGen: Simplify logic for locating the legacy type info YAML file
2 parents a6aa7a5 + 0b884c8 commit 506aa1d

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

Diff for: lib/IRGen/GenType.cpp

+1-17
Original file line numberDiff line numberDiff line change
@@ -1355,23 +1355,7 @@ TypeConverter::TypeConverter(IRGenModule &IGM)
13551355
if (!doesPlatformUseLegacyLayouts(platformName, archName))
13561356
return;
13571357

1358-
// Find the first runtime library path that exists.
1359-
bool found = false;
1360-
for (auto &RuntimeLibraryPath
1361-
: IGM.Context.SearchPathOpts.RuntimeLibraryPaths) {
1362-
if (fs->exists(RuntimeLibraryPath)) {
1363-
defaultPath.append(RuntimeLibraryPath);
1364-
found = true;
1365-
break;
1366-
}
1367-
}
1368-
if (!found) {
1369-
auto joined = llvm::join(IGM.Context.SearchPathOpts.RuntimeLibraryPaths,
1370-
"', '");
1371-
llvm::report_fatal_error("Unable to find a runtime library path at '"
1372-
+ joined + "'");
1373-
}
1374-
1358+
defaultPath = IGM.Context.SearchPathOpts.RuntimeLibraryPaths[0];
13751359
llvm::sys::path::append(defaultPath, "layouts-");
13761360
defaultPath.append(archName);
13771361
defaultPath.append(".yaml");

0 commit comments

Comments
 (0)