diff options
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/ConstantsScanner.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/InstForest.h | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/include/llvm/Analysis/ConstantsScanner.h b/include/llvm/Analysis/ConstantsScanner.h index 3a496c3..cbf9765 100644 --- a/include/llvm/Analysis/ConstantsScanner.h +++ b/include/llvm/Analysis/ConstantsScanner.h @@ -45,7 +45,7 @@ public: inline pointer operator*() const { assert(isAtConstant() && "Dereferenced an iterator at the end!"); - return InstI->getOperand(OpIdx)->castConstantAsserting(); + return cast<ConstPoolVal>(InstI->getOperand(OpIdx)); } inline pointer operator->() const { return operator*(); } diff --git a/include/llvm/Analysis/InstForest.h b/include/llvm/Analysis/InstForest.h index fd9677d..eac08f9 100644 --- a/include/llvm/Analysis/InstForest.h +++ b/include/llvm/Analysis/InstForest.h @@ -20,8 +20,8 @@ namespace analysis { -template <class Payload> class InstTreeNode; -template<class Payload> class InstForest; +template<class Payload> class InstTreeNode; +template<class Payload> class InstForest; //===----------------------------------------------------------------------===// @@ -74,10 +74,10 @@ public: // Accessors for different node types... inline ConstPoolVal *getConstant() { - return getValue()->castConstantAsserting(); + return cast<ConstPoolVal>(getValue()); } inline const ConstPoolVal *getConstant() const { - return getValue()->castConstantAsserting(); + return cast<const ConstPoolVal>(getValue()); } inline BasicBlock *getBasicBlock() { return cast<BasicBlock>(getValue()); @@ -230,12 +230,12 @@ InstTreeNode<Payload>::InstTreeNode(InstForest<Payload> &IF, Value *V, getTreeData().first.first = V; // Save tree node if (!V->isInstruction()) { - assert((V->isConstant() || V->isBasicBlock() || - V->isMethodArgument() || V->isGlobal()) && + assert((isa<ConstPoolVal>(V) || isa<BasicBlock>(V) || + isa<MethodArgument>(V) || isa<GlobalVariable>(V)) && "Unrecognized value type for InstForest Partition!"); - if (V->isConstant()) + if (isa<ConstPoolVal>(V)) getTreeData().first.second = ConstNode; - else if (V->isBasicBlock()) + else if (isa<BasicBlock>(V)) getTreeData().first.second = BasicBlockNode; else getTreeData().first.second = TemporaryNode; |