aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/LoopInfo.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-05-15 16:13:11 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-05-15 16:13:11 +0000
commitedd5d9ece15f73ec1a31423a4ae39774aa6c521c (patch)
tree0cf64cf1cf786dfc0af67d7f048e4e26a86738d3 /include/llvm/Analysis/LoopInfo.h
parent98a493c7cef0b81d499eae82a1f9b748d5e59eeb (diff)
Some cleanups for compilation with GCC 4.0.0 to remove warnings:
* Use C++ style casts, not C style casts * Abstract base classes should have virtual destructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/LoopInfo.h')
-rw-r--r--include/llvm/Analysis/LoopInfo.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index acd739b6b4..95626a4292 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -230,7 +230,8 @@ public:
/// block is in no loop (for example the entry node), null is returned.
///
Loop *getLoopFor(const BasicBlock *BB) const {
- std::map<BasicBlock *, Loop*>::const_iterator I=BBMap.find((BasicBlock*)BB);
+ std::map<BasicBlock *, Loop*>::const_iterator I=
+ BBMap.find(const_cast<BasicBlock*>(BB));
return I != BBMap.end() ? I->second : 0;
}
@@ -300,7 +301,7 @@ private:
// Make sure that any clients of this file link in LoopInfo.cpp
static IncludeFile
-LOOP_INFO_INCLUDE_FILE((void*)&LoopInfo::stub);
+LOOP_INFO_INCLUDE_FILE(reinterpret_cast<void*>(&LoopInfo::stub));
// Allow clients to walk the list of nested loops...
template <> struct GraphTraits<const Loop*> {