mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Add some operators the PowerPC backend needs to efficiently and correctly
generate conditional branches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
877c3e2b81
commit
cb647519d3
@ -169,6 +169,26 @@ void operator+(int, ilist_iterator<T>);
|
||||
template<typename T>
|
||||
void operator+(ilist_iterator<T>,int);
|
||||
|
||||
// operator!=/operator== - Allow mixed comparisons without dereferencing
|
||||
// the iterator, which could very likely be pointing to end().
|
||||
template<typename T>
|
||||
bool operator!=(const T* LHS, const ilist_iterator<const T> &RHS) {
|
||||
return LHS != RHS.getNodePtrUnchecked();
|
||||
}
|
||||
template<typename T>
|
||||
bool operator==(const T* LHS, const ilist_iterator<const T> &RHS) {
|
||||
return LHS == RHS.getNodePtrUnchecked();
|
||||
}
|
||||
template<typename T>
|
||||
bool operator!=(T* LHS, const ilist_iterator<T> &RHS) {
|
||||
return LHS != RHS.getNodePtrUnchecked();
|
||||
}
|
||||
template<typename T>
|
||||
bool operator==(T* LHS, const ilist_iterator<T> &RHS) {
|
||||
return LHS == RHS.getNodePtrUnchecked();
|
||||
}
|
||||
|
||||
|
||||
// Allow ilist_iterators to convert into pointers to a node automatically when
|
||||
// used by the dyn_cast, cast, isa mechanisms...
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user