Skip to content

Commit 83f5162

Browse files
committed
[NFC] Reorder InputInfo::Status In Terms of Impact on the Incremental Build
1 parent 25978e1 commit 83f5162

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

include/swift/Driver/Action.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ class IncrementalJobAction : public JobAction {
132132
struct InputInfo {
133133
enum Status {
134134
UpToDate,
135-
NeedsCascadingBuild,
136135
NeedsNonCascadingBuild,
136+
NeedsCascadingBuild,
137137
NewlyAdded
138138
};
139139

lib/Driver/CompilationRecord.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ inline static StringRef getName(TopLevelKey Key) {
5959
inline static StringRef
6060
getIdentifierForInputInfoStatus(CompileJobAction::InputInfo::Status Status) {
6161
switch (Status) {
62-
case CompileJobAction::InputInfo::UpToDate:
62+
case CompileJobAction::InputInfo::Status::UpToDate:
6363
return "";
64-
case CompileJobAction::InputInfo::NewlyAdded:
65-
case CompileJobAction::InputInfo::NeedsCascadingBuild:
64+
case CompileJobAction::InputInfo::Status::NewlyAdded:
65+
case CompileJobAction::InputInfo::Status::NeedsCascadingBuild:
6666
return "!dirty";
67-
case CompileJobAction::InputInfo::NeedsNonCascadingBuild:
67+
case CompileJobAction::InputInfo::Status::NeedsNonCascadingBuild:
6868
return "!private";
6969
}
7070

@@ -76,11 +76,11 @@ getIdentifierForInputInfoStatus(CompileJobAction::InputInfo::Status Status) {
7676
/// compilation record file (.swiftdeps file).
7777
inline static Optional<CompileJobAction::InputInfo::Status>
7878
getInfoStatusForIdentifier(StringRef Identifier) {
79-
return llvm::StringSwitch<Optional<
80-
CompileJobAction::InputInfo::Status>>(Identifier)
81-
.Case("", CompileJobAction::InputInfo::UpToDate)
82-
.Case("!dirty", CompileJobAction::InputInfo::NeedsCascadingBuild)
83-
.Case("!private", CompileJobAction::InputInfo::NeedsNonCascadingBuild)
79+
using InputStatus = CompileJobAction::InputInfo::Status;
80+
return llvm::StringSwitch<Optional<InputStatus>>(Identifier)
81+
.Case("", InputStatus::UpToDate)
82+
.Case("!dirty", InputStatus::NeedsCascadingBuild)
83+
.Case("!private", InputStatus::NeedsNonCascadingBuild)
8484
.Default(None);
8585
}
8686

0 commit comments

Comments
 (0)