Skip to content

Commit c5bfaa4

Browse files
committed
Merge pull request #361 from dcci/infrecursion
Fix a couple of cases of infinite recursion
2 parents cf11ca4 + ff15955 commit c5bfaa4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

include/swift/SILPasses/Utils/Local.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ class IgnoreExpectUseIterator
571571

572572
Operand *operator*() const { return *CurrentIter; }
573573
Operand *operator->() const { return *CurrentIter; }
574-
SILInstruction *getUser() const { return this->getUser(); }
574+
SILInstruction *getUser() const { return CurrentIter->getUser(); }
575575

576576
IgnoreExpectUseIterator &operator++() {
577577
assert(**this && "increment past end()!");

lib/IRGen/GenMeta.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,8 +2039,9 @@ namespace {
20392039
#define BEGIN_METADATA_SEARCHER_0(SEARCHER, DECLKIND) \
20402040
struct SEARCHER \
20412041
: MetadataSearcher<DECLKIND##MetadataScanner<SEARCHER>> { \
2042+
using super = MetadataSearcher; \
20422043
SEARCHER(IRGenModule &IGM, DECLKIND##Decl *target) \
2043-
: MetadataSearcher(IGM, target) {}
2044+
: super(IGM, target) {}
20442045
#define BEGIN_METADATA_SEARCHER_1(SEARCHER, DECLKIND, TYPE_1, NAME_1) \
20452046
struct SEARCHER \
20462047
: MetadataSearcher<DECLKIND##MetadataScanner<SEARCHER>> { \
@@ -3790,7 +3791,7 @@ namespace {
37903791
BEGIN_METADATA_SEARCHER_0(FindClassParentIndex, Class)
37913792
void addParentMetadataRef(ClassDecl *forClass) {
37923793
if (forClass == Target) setTargetOffset();
3793-
addParentMetadataRef(forClass);
3794+
super::addParentMetadataRef(forClass);
37943795
}
37953796
END_METADATA_SEARCHER()
37963797
}

0 commit comments

Comments
 (0)