Skip to content

Commit bb4cae0

Browse files
committed
IRGen: Rename -read-type-info-path flag to -read-legacy-type-info-path
1 parent 9f80a9c commit bb4cae0

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

include/swift/AST/IRGenOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class IRGenOptions {
179179
unsigned LazyInitializeClassMetadata : 1;
180180

181181
/// The path to load legacy type layouts from.
182-
StringRef ReadTypeInfoPath;
182+
StringRef ReadLegacyTypeInfoPath;
183183

184184
/// Should we try to build incrementally by not emitting an object file if it
185185
/// has the same IR hash as the module that we are preparing to emit?

include/swift/Option/FrontendOptions.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ def enable_resilience : Flag<["-"], "enable-resilience">,
177177
def enable_class_resilience : Flag<["-"], "enable-class-resilience">,
178178
HelpText<"Enable resilient layout for classes containing resilient value types">;
179179

180-
def read_type_info_path_EQ : Joined<["-"], "read-type-info-path=">,
181-
HelpText<"Read legacy type layout from the given path">;
180+
def read_legacy_type_info_path_EQ : Joined<["-"], "read-legacy-type-info-path=">,
181+
HelpText<"Read legacy type layout from the given path instead of default path">;
182182
}
183183

184184

lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,8 +1079,8 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
10791079
// (e.g. NativeObject). Force the lazy initialization of the VWT always.
10801080
Opts.LazyInitializeClassMetadata = Triple.isOSBinFormatCOFF();
10811081

1082-
if (const Arg *A = Args.getLastArg(OPT_read_type_info_path_EQ)) {
1083-
Opts.ReadTypeInfoPath = A->getValue();
1082+
if (const Arg *A = Args.getLastArg(OPT_read_legacy_type_info_path_EQ)) {
1083+
Opts.ReadLegacyTypeInfoPath = A->getValue();
10841084
}
10851085

10861086
for (const auto &Lib : Args.getAllArgValues(options::OPT_autolink_library))

lib/IRGen/GenClass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ namespace {
378378
if (CompletelyFragileLayout && !eltType->isFixedSize()) {
379379
// For staging purposes, only do the new thing if the path flag
380380
// is provided.
381-
auto mode = (IGM.IRGen.Opts.ReadTypeInfoPath.empty()
381+
auto mode = (IGM.IRGen.Opts.ReadLegacyTypeInfoPath.empty()
382382
? TypeConverter::Mode::CompletelyFragile
383383
: TypeConverter::Mode::Legacy);
384384
LoweringModeScope scope(IGM, mode);

lib/IRGen/GenType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,7 @@ TypeConverter::TypeConverter(IRGenModule &IGM)
11251125
if (IGM.IRGen.Opts.EnableResilienceBypass)
11261126
LoweringMode = Mode::CompletelyFragile;
11271127

1128-
StringRef path = IGM.IRGen.Opts.ReadTypeInfoPath;
1128+
StringRef path = IGM.IRGen.Opts.ReadLegacyTypeInfoPath;
11291129
if (!path.empty()) {
11301130
bool error = readLegacyTypeInfo(path);
11311131
if (error) {

test/IRGen/completely_fragile_class_layout.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// RUN: %target-swift-frontend -I %t -emit-ir -enable-resilience %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize
55

6-
// RUN: %target-swift-frontend -I %t -emit-ir -enable-resilience %s -read-type-info-path=%S/Inputs/legacy_type_info/a.yaml | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize
6+
// RUN: %target-swift-frontend -I %t -emit-ir -enable-resilience %s -read-legacy-type-info-path=%S/Inputs/legacy_type_info/a.yaml | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize
77

88
// RUN: %target-swift-frontend -I %t -emit-ir -enable-resilience -O %s
99

0 commit comments

Comments
 (0)