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
This commit is contained in:
Reid Spencer
2005-05-15 16:13:11 +00:00
parent 98a493c7ce
commit edd5d9ece1
8 changed files with 18 additions and 12 deletions

View File

@ -60,7 +60,7 @@ public:
// Make sure that any clients of this file link in PostDominators.cpp
static IncludeFile
FIND_USED_TYPES_INCLUDE_FILE((void*)&FindUsedTypes::stub);
FIND_USED_TYPES_INCLUDE_FILE(reinterpret_cast<void*>(&FindUsedTypes::stub));
} // End llvm namespace

View File

@ -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*> {