aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar/Reassociate.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-02-21 20:39:50 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-02-21 20:39:50 +0000
commite9bc579c37c038abb66ac30489a1e26e5045ef9f (patch)
tree3abf644028ed631aa020ef203627ddb7184677db /llvm/lib/Transforms/Scalar/Reassociate.cpp
parentec6f7fed54cdcc0e2588f912626314c0a58b24d7 (diff)
downloadllvm-e9bc579c37c038abb66ac30489a1e26e5045ef9f.zip
llvm-e9bc579c37c038abb66ac30489a1e26e5045ef9f.tar.gz
llvm-e9bc579c37c038abb66ac30489a1e26e5045ef9f.tar.bz2
ADT: Remove == and != comparisons between ilist iterators and pointers
I missed == and != when I removed implicit conversions between iterators and pointers in r252380 since they were defined outside ilist_iterator. Since they depend on getNodePtrUnchecked(), they indirectly rely on UB. This commit removes all uses of these operators. (I'll delete the operators themselves in a separate commit so that it can be easily reverted if necessary.) There should be NFC here. llvm-svn: 261498
Diffstat (limited to 'llvm/lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/Reassociate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index a6fe51c..b22e2cd 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -2286,7 +2286,7 @@ bool Reassociate::runOnFunction(Function &F) {
EraseInst(&*II++);
} else {
OptimizeInst(&*II);
- assert(II->getParent() == BI && "Moved to a different block!");
+ assert(II->getParent() == &*BI && "Moved to a different block!");
++II;
}