Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions llvm/include/llvm/Support/Registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ namespace llvm {
public:
explicit iterator(const node *N) : Cur(N) {}

#ifndef __swift__
bool operator==(const iterator &That) const { return Cur == That.Cur; }
#endif
iterator &operator++() { Cur = Cur->Next; return *this; }
const entry &operator*() const { return Cur->Val; }
};
Expand Down
2 changes: 2 additions & 0 deletions llvm/include/llvm/TextAPI/Record.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,13 @@ class ObjCInterfaceRecord : public ObjCContainerRecord {
RecordLinkage Class = RecordLinkage::Unknown;
RecordLinkage MetaClass = RecordLinkage::Unknown;
RecordLinkage EHType = RecordLinkage::Unknown;
#ifndef __swift__
bool operator==(const Linkages &other) const {
return std::tie(Class, MetaClass, EHType) ==
std::tie(other.Class, other.MetaClass, other.EHType);
}
bool operator!=(const Linkages &other) const { return !(*this == other); }
#endif
};
Linkages Linkages;

Expand Down
2 changes: 2 additions & 0 deletions llvm/include/llvm/Transforms/IPO/Attributor.h
Original file line number Diff line number Diff line change
Expand Up @@ -5852,11 +5852,13 @@ struct AAPointerInfo : public AbstractAttribute {
const_iterator begin() const { return Offsets.begin(); }
const_iterator end() const { return Offsets.end(); }

#ifndef __swift__
bool operator==(const OffsetInfo &RHS) const {
return Offsets == RHS.Offsets;
}

bool operator!=(const OffsetInfo &RHS) const { return !(*this == RHS); }
#endif

bool insert(int64_t Offset) { return Offsets.insert(Offset).second; }
bool isUnassigned() const { return Offsets.size() == 0; }
Expand Down
2 changes: 2 additions & 0 deletions llvm/include/llvm/Transforms/Scalar/GVN.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,14 @@ class GVNPass : public PassInfoMixin<GVNPass> {
Current = Current->Next;
return *this;
}
#ifndef __swift__
bool operator==(const leader_iterator &Other) const {
return Current == Other.Current;
}
bool operator!=(const leader_iterator &Other) const {
return Current != Other.Current;
}
#endif
reference operator*() const { return Current->Entry; }
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,13 @@ class SeedContainer {
++(*this);
return Copy;
}
#ifndef __swift__
bool operator==(const iterator &Other) const {
assert(Map == Other.Map && "Iterator of different objects!");
return MapIt == Other.MapIt && VecIdx == Other.VecIdx;
}
bool operator!=(const iterator &Other) const { return !(*this == Other); }
#endif
};
using const_iterator = BundleMapT::const_iterator;
template <typename LoadOrStoreT> void insert(LoadOrStoreT *LSI);
Expand Down