mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[IRGen] Eliminate infinite loop in keypath generation.
Uncovered by the investigation of rdar://problem/45685649.
This commit is contained in:
@@ -728,7 +728,7 @@ emitWitnessTableGeneratorForKeyPath(IRGenModule &IGM,
|
||||
static unsigned getClassFieldIndex(ClassDecl *classDecl, VarDecl *property) {
|
||||
SmallVector<ClassDecl *, 3> superclasses;
|
||||
for (auto *superDecl = classDecl; superDecl != nullptr;
|
||||
superDecl = classDecl->getSuperclassDecl()) {
|
||||
superDecl = superDecl->getSuperclassDecl()) {
|
||||
superclasses.push_back(superDecl);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user