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)
1158
1158
if (IGM.IRGen .Opts .DisableLegacyTypeInfo )
1159
1159
return ;
1160
1160
1161
- auto platformName = getPlatformNameForTriple (IGM.Triple );
1162
- auto archName = getMajorArchitectureName (IGM.Triple );
1163
-
1164
- if (!doesPlatformUseLegacyLayouts (platformName, archName))
1165
- return ;
1166
-
1167
1161
llvm::SmallString<128 > defaultPath;
1168
1162
1169
1163
StringRef path = IGM.IRGen .Opts .ReadLegacyTypeInfoPath ;
1170
1164
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
+
1171
1174
defaultPath.append (IGM.Context .SearchPathOpts .RuntimeLibraryPath );
1172
1175
llvm::sys::path::append (defaultPath, " layouts-" );
1173
1176
defaultPath.append (archName);
You can’t perform that action at this time.
0 commit comments