diff options
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 9db52f6..f0d9a8e 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -311,6 +311,7 @@ public: /// bool properlyDominates(const Node *N) const { const Node *IDom; + if (this == 0 || N == 0) return false; while ((IDom = N->getIDom()) != 0 && IDom != this) N = IDom; // Walk up the tree return IDom != 0; |