[llvm-commits] CVS: llvm/include/llvm/Analysis/Dominators.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Sep 29 16:38:01 PDT 2002
Changes in directory llvm/include/llvm/Analysis:
Dominators.h updated: 1.25 -> 1.26
---
Log message:
Simplify code a bit, add an assertion
---
Diffs of the changes:
Index: llvm/include/llvm/Analysis/Dominators.h
diff -u llvm/include/llvm/Analysis/Dominators.h:1.25 llvm/include/llvm/Analysis/Dominators.h:1.26
--- llvm/include/llvm/Analysis/Dominators.h:1.25 Thu Sep 26 11:14:37 2002
+++ llvm/include/llvm/Analysis/Dominators.h Sun Sep 29 16:37:08 2002
@@ -296,9 +296,8 @@
///
Node *createNewNode(BasicBlock *BB, Node *IDomNode) {
assert(getNode(BB) == 0 && "Block already in dominator tree!");
- Node *New = Nodes[BB] = new Node(BB, IDomNode);
- if (IDomNode) IDomNode->addChild(New);
- return New;
+ assert(IDomNode && "Not immediate dominator specified for block!");
+ return Nodes[BB] = IDomNode->addChild(new Node(BB, IDomNode));
}
/// changeImmediateDominator - This method is used to update the dominator
More information about the llvm-commits
mailing list