[llvm-commits] CVS: llvm/include/llvm/Analysis/PostDominators.h
Chris Lattner
lattner at cs.uiuc.edu
Mon Sep 15 10:48:03 PDT 2003
Changes in directory llvm/include/llvm/Analysis:
PostDominators.h updated: 1.2 -> 1.3
---
Log message:
Do not segfault when the post-dominator tree is empty (ie, there are no return
or unwind instructions in the function)
---
Diffs of the changes:
Index: llvm/include/llvm/Analysis/PostDominators.h
diff -u llvm/include/llvm/Analysis/PostDominators.h:1.2 llvm/include/llvm/Analysis/PostDominators.h:1.3
--- llvm/include/llvm/Analysis/PostDominators.h:1.2 Wed Sep 10 15:36:51 2003
+++ llvm/include/llvm/Analysis/PostDominators.h Mon Sep 15 10:47:40 2003
@@ -88,7 +88,8 @@
Frontiers.clear();
PostDominatorTree &DT = getAnalysis<PostDominatorTree>();
Roots = DT.getRoots();
- calculate(DT, DT.getRootNode());
+ if (const DominatorTree::Node *Root = DT.getRootNode())
+ calculate(DT, Root);
return false;
}
More information about the llvm-commits
mailing list