Skip to content

Commit 31f2617

Browse files
committed
NFC. Move paired methods together in a header file.
They are used together - move the implementations together.
1 parent 1e4721d commit 31f2617

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

lib/Sema/ConstraintSystem.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,22 +1144,6 @@ class ConstraintSystem {
11441144
#define CS_STATISTIC(Name, Description) unsigned Name = 0;
11451145
#include "ConstraintSolverStats.def"
11461146

1147-
/// \brief Register given scope to be tracked by the current solver state,
1148-
/// this helps to make sure that all of the retired/generated constraints
1149-
/// are dealt with correctly when the life time of the scope ends.
1150-
///
1151-
/// \param scope The scope to associate with current solver state.
1152-
void registerScope(SolverScope *scope) {
1153-
++depth;
1154-
++NumStatesExplored;
1155-
1156-
CS.incrementScopeCounter();
1157-
auto scopeInfo =
1158-
std::make_tuple(scope, retiredConstraints.begin(),
1159-
generatedConstraints.size());
1160-
scopes.push_back(scopeInfo);
1161-
}
1162-
11631147
/// \brief Check whether there are any retired constraints present.
11641148
bool hasRetiredConstraints() const {
11651149
return !retiredConstraints.empty();
@@ -1207,6 +1191,22 @@ class ConstraintSystem {
12071191
}
12081192
}
12091193

1194+
/// \brief Register given scope to be tracked by the current solver state,
1195+
/// this helps to make sure that all of the retired/generated constraints
1196+
/// are dealt with correctly when the life time of the scope ends.
1197+
///
1198+
/// \param scope The scope to associate with current solver state.
1199+
void registerScope(SolverScope *scope) {
1200+
++depth;
1201+
++NumStatesExplored;
1202+
1203+
CS.incrementScopeCounter();
1204+
auto scopeInfo =
1205+
std::make_tuple(scope, retiredConstraints.begin(),
1206+
generatedConstraints.size());
1207+
scopes.push_back(scopeInfo);
1208+
}
1209+
12101210
/// \brief Restore all of the retired/generated constraints to the state
12111211
/// before given scope. This is required because retired constraints have
12121212
/// to be re-introduced to the system in order of arrival (LIFO) and list

0 commit comments

Comments
 (0)