mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
Add some constantness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176518 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -101,18 +101,18 @@ public:
|
|||||||
Children.clear();
|
Children.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool compare(DomTreeNodeBase<NodeT> *Other) {
|
bool compare(const DomTreeNodeBase<NodeT> *Other) const {
|
||||||
if (getNumChildren() != Other->getNumChildren())
|
if (getNumChildren() != Other->getNumChildren())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
SmallPtrSet<NodeT *, 4> OtherChildren;
|
SmallPtrSet<const NodeT *, 4> OtherChildren;
|
||||||
for (iterator I = Other->begin(), E = Other->end(); I != E; ++I) {
|
for (const_iterator I = Other->begin(), E = Other->end(); I != E; ++I) {
|
||||||
NodeT *Nd = (*I)->getBlock();
|
const NodeT *Nd = (*I)->getBlock();
|
||||||
OtherChildren.insert(Nd);
|
OtherChildren.insert(Nd);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (iterator I = begin(), E = end(); I != E; ++I) {
|
for (const_iterator I = begin(), E = end(); I != E; ++I) {
|
||||||
NodeT *N = (*I)->getBlock();
|
const NodeT *N = (*I)->getBlock();
|
||||||
if (OtherChildren.count(N) == 0)
|
if (OtherChildren.count(N) == 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user