diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-29 01:07:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-29 01:07:12 +0000 |
commit | d87ef134d74761a019d1cc90f10462af1a3bdd4c (patch) | |
tree | 9cd53c3f4e472e30ce22041cba16d81304135301 /include | |
parent | cae34910c91988670db472ad399cf3798cc6649f (diff) | |
download | external_llvm-d87ef134d74761a019d1cc90f10462af1a3bdd4c.zip external_llvm-d87ef134d74761a019d1cc90f10462af1a3bdd4c.tar.gz external_llvm-d87ef134d74761a019d1cc90f10462af1a3bdd4c.tar.bz2 |
Fix PR670 and test/Regression/Transforms/Mem2Reg/2005-11-28-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24508 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-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; |