File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -370,6 +370,8 @@ static bool createsInfiniteSpecializationLoop(ApplySite Apply) {
370
370
LLVM_DEBUG (llvm::dbgs () << " Scan caller's specialization history\n " );
371
371
}
372
372
373
+ llvm::SmallSet<const GenericSpecializationInformation *, 8 > visited;
374
+
373
375
while (CurSpecializationInfo) {
374
376
LLVM_DEBUG (llvm::dbgs () << " Current caller is a specialization:\n "
375
377
<< " Caller: "
@@ -385,6 +387,10 @@ static bool createsInfiniteSpecializationLoop(ApplySite Apply) {
385
387
Replacement->dump (llvm::dbgs ());
386
388
});
387
389
390
+ if (!visited.insert (CurSpecializationInfo).second ) {
391
+ return true ;
392
+ }
393
+
388
394
if (CurSpecializationInfo->getParent () == GenericFunc) {
389
395
LLVM_DEBUG (llvm::dbgs () << " Found a call graph loop, checking "
390
396
" substitutions\n " );
You can’t perform that action at this time.
0 commit comments