diff --git a/lib/IRGen/GenType.cpp b/lib/IRGen/GenType.cpp index 7c8423d1f357b..1d99e48ca3f42 100644 --- a/lib/IRGen/GenType.cpp +++ b/lib/IRGen/GenType.cpp @@ -1355,23 +1355,7 @@ TypeConverter::TypeConverter(IRGenModule &IGM) if (!doesPlatformUseLegacyLayouts(platformName, archName)) return; - // Find the first runtime library path that exists. - bool found = false; - for (auto &RuntimeLibraryPath - : IGM.Context.SearchPathOpts.RuntimeLibraryPaths) { - if (fs->exists(RuntimeLibraryPath)) { - defaultPath.append(RuntimeLibraryPath); - found = true; - break; - } - } - if (!found) { - auto joined = llvm::join(IGM.Context.SearchPathOpts.RuntimeLibraryPaths, - "', '"); - llvm::report_fatal_error("Unable to find a runtime library path at '" - + joined + "'"); - } - + defaultPath = IGM.Context.SearchPathOpts.RuntimeLibraryPaths[0]; llvm::sys::path::append(defaultPath, "layouts-"); defaultPath.append(archName); defaultPath.append(".yaml");