diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:01:25 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:01:25 +0000 |
commit | d8e91e46262bc44006913e6796843909f1ac7bcd (patch) | |
tree | 7d0c143d9b38190e0fa0180805389da22cd834c5 /lib/Analysis/OrderedBasicBlock.cpp | |
parent | b7eb8e35e481a74962664b63dfb09483b200209a (diff) |
Notes
Diffstat (limited to 'lib/Analysis/OrderedBasicBlock.cpp')
-rw-r--r-- | lib/Analysis/OrderedBasicBlock.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Analysis/OrderedBasicBlock.cpp b/lib/Analysis/OrderedBasicBlock.cpp index 6c47651eae9e..5f4fe0f7dda2 100644 --- a/lib/Analysis/OrderedBasicBlock.cpp +++ b/lib/Analysis/OrderedBasicBlock.cpp @@ -37,6 +37,8 @@ bool OrderedBasicBlock::comesBefore(const Instruction *A, const Instruction *Inst = nullptr; assert(!(LastInstFound == BB->end() && NextInstPos != 0) && "Instruction supposed to be in NumberedInsts"); + assert(A->getParent() == BB && "Instruction supposed to be in the block!"); + assert(B->getParent() == BB && "Instruction supposed to be in the block!"); // Start the search with the instruction found in the last lookup round. auto II = BB->begin(); @@ -65,6 +67,7 @@ bool OrderedBasicBlock::comesBefore(const Instruction *A, bool OrderedBasicBlock::dominates(const Instruction *A, const Instruction *B) { assert(A->getParent() == B->getParent() && "Instructions must be in the same basic block!"); + assert(A->getParent() == BB && "Instructions must be in the tracked block!"); // First we lookup the instructions. If they don't exist, lookup will give us // back ::end(). If they both exist, we compare the numbers. Otherwise, if NA |