@@ -185,7 +185,7 @@ static bool isTransitiveEscapeInst(SILInstruction *Inst) {
185
185
}
186
186
187
187
// / Maximum amount of ValueCapture queries.
188
- static unsigned const Threshold = 32 ;
188
+ static unsigned const ValueCaptureSearchThreshold = 32 ;
189
189
190
190
namespace {
191
191
@@ -205,8 +205,8 @@ enum CaptureException : unsigned {
205
205
// / case to be conservative, we must assume it is captured.
206
206
// / FIXME: Maybe put this on SILValue?
207
207
static bool valueMayBeCaptured (SILValue V, CaptureException Exception) {
208
- llvm::SmallVector<Operand *, Threshold > Worklist;
209
- llvm::SmallPtrSet<Operand *, Threshold > Visited;
208
+ llvm::SmallVector<Operand *, ValueCaptureSearchThreshold > Worklist;
209
+ llvm::SmallPtrSet<Operand *, ValueCaptureSearchThreshold > Visited;
210
210
unsigned Count = 0 ;
211
211
212
212
DEBUG (llvm::dbgs () << " Checking for capture.\n " );
@@ -216,7 +216,7 @@ static bool valueMayBeCaptured(SILValue V, CaptureException Exception) {
216
216
for (auto *UI : V.getUses ()) {
217
217
// If we have more uses than the threshold, be conservative and bail so we
218
218
// don't use too much compile time.
219
- if (Count++ >= Threshold )
219
+ if (Count++ >= ValueCaptureSearchThreshold )
220
220
return true ;
221
221
Visited.insert (UI);
222
222
Worklist.push_back (UI);
@@ -238,7 +238,7 @@ static bool valueMayBeCaptured(SILValue V, CaptureException Exception) {
238
238
for (auto *UI : Inst->getUses ()) {
239
239
// If we have more uses than the threshold, be conservative and bail
240
240
// so we don't use too much compile time.
241
- if (Count++ >= Threshold )
241
+ if (Count++ >= ValueCaptureSearchThreshold )
242
242
return true ;
243
243
244
244
if (Visited.insert (UI).second ) {
0 commit comments