File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -1158,16 +1158,19 @@ TypeConverter::TypeConverter(IRGenModule &IGM)
11581158 if (IGM.IRGen .Opts .DisableLegacyTypeInfo )
11591159 return ;
11601160
1161- auto platformName = getPlatformNameForTriple (IGM.Triple );
1162- auto archName = getMajorArchitectureName (IGM.Triple );
1163-
1164- if (!doesPlatformUseLegacyLayouts (platformName, archName))
1165- return ;
1166-
11671161 llvm::SmallString<128 > defaultPath;
11681162
11691163 StringRef path = IGM.IRGen .Opts .ReadLegacyTypeInfoPath ;
11701164 if (path.empty ()) {
1165+ // If the flag was not explicitly specified, look for a file in a
1166+ // platform-specific location, if this platform is known to require
1167+ // one.
1168+ auto platformName = getPlatformNameForTriple (IGM.Triple );
1169+ auto archName = getMajorArchitectureName (IGM.Triple );
1170+
1171+ if (!doesPlatformUseLegacyLayouts (platformName, archName))
1172+ return ;
1173+
11711174 defaultPath.append (IGM.Context .SearchPathOpts .RuntimeLibraryPath );
11721175 llvm::sys::path::append (defaultPath, " layouts-" );
11731176 defaultPath.append (archName);
You can’t perform that action at this time.
0 commit comments