Skip to content

Commit 4268572

Browse files
committed
Suppress warnings for Swift C++ interop by hiding operator declarations.
Solves this warning during the Swift compiler build: ``` .../SuffixTree.h:200:10: warning: cycle detected while resolving 'RepeatedSubstringIterator' in swift_name attribute for 'operator==' ```
1 parent 135d433 commit 4268572

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/include/llvm/Support/SuffixTree.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,14 @@ class SuffixTree {
197197
return It;
198198
}
199199

200+
#ifndef __swift__
200201
bool operator==(const RepeatedSubstringIterator &Other) const {
201202
return N == Other.N;
202203
}
203204
bool operator!=(const RepeatedSubstringIterator &Other) const {
204205
return !(*this == Other);
205206
}
207+
#endif
206208

207209
RepeatedSubstringIterator(
208210
SuffixTreeInternalNode *N,

0 commit comments

Comments
 (0)