aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-01 18:26:53 +0000
committerChris Lattner <sabre@nondot.org>2001-10-01 18:26:53 +0000
commitcfe26c930ae691ff3012736555846c45087e1a9e (patch)
treeb68b70097da64da9be4a068f62d7ae3d43e05896 /include/llvm/Analysis
parent9636a91649f168f41b477cba705287665e054f79 (diff)
downloadexternal_llvm-cfe26c930ae691ff3012736555846c45087e1a9e.zip
external_llvm-cfe26c930ae691ff3012736555846c45087e1a9e.tar.gz
external_llvm-cfe26c930ae691ff3012736555846c45087e1a9e.tar.bz2
Add more support for new style casts
Convert more code to use them git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r--include/llvm/Analysis/ConstantsScanner.h2
-rw-r--r--include/llvm/Analysis/InstForest.h16
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;