summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Staszak <kubastaszak@gmail.com>2013-03-09 18:24:26 +0000
committerJakub Staszak <kubastaszak@gmail.com>2013-03-09 18:24:26 +0000
commit64bf55af6f3cc6c6db985d3840547b5869e57222 (patch)
treec37bb21baeec48e502c766cc029c1c360d063b7a
parent209cb5b56bb90f1ceee570efabe9c04121cb0beb (diff)
downloadllvm-64bf55af6f3cc6c6db985d3840547b5869e57222.tar.gz
llvm-64bf55af6f3cc6c6db985d3840547b5869e57222.tar.bz2
llvm-64bf55af6f3cc6c6db985d3840547b5869e57222.tar.xz
Remove unneeded const_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176771 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/LoopInfo.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index b583b717bd..783e347522 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -147,10 +147,10 @@ public:
/// block that is outside of the current loop.
///
bool isLoopExiting(const BlockT *BB) const {
- typedef GraphTraits<BlockT*> BlockTraits;
+ typedef GraphTraits<const BlockT*> BlockTraits;
for (typename BlockTraits::ChildIteratorType SI =
- BlockTraits::child_begin(const_cast<BlockT*>(BB)),
- SE = BlockTraits::child_end(const_cast<BlockT*>(BB)); SI != SE; ++SI) {
+ BlockTraits::child_begin(BB),
+ SE = BlockTraits::child_end(BB); SI != SE; ++SI) {
if (!contains(*SI))
return true;
}
@@ -165,8 +165,8 @@ public:
typedef GraphTraits<Inverse<BlockT*> > InvBlockTraits;
for (typename InvBlockTraits::ChildIteratorType I =
- InvBlockTraits::child_begin(const_cast<BlockT*>(H)),
- E = InvBlockTraits::child_end(const_cast<BlockT*>(H)); I != E; ++I)
+ InvBlockTraits::child_begin(H),
+ E = InvBlockTraits::child_end(H); I != E; ++I)
if (contains(*I))
++NumBackEdges;