[llvm-commits] CVS: llvm/include/llvm/Analysis/FindUsedTypes.h LoopInfo.h
Reid Spencer
reid at x10sys.com
Sun May 15 09:13:24 PDT 2005
Changes in directory llvm/include/llvm/Analysis:
FindUsedTypes.h updated: 1.24 -> 1.25
LoopInfo.h updated: 1.46 -> 1.47
---
Log message:
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.
---
Diffs of the changes: (+4 -3)
FindUsedTypes.h | 2 +-
LoopInfo.h | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
Index: llvm/include/llvm/Analysis/FindUsedTypes.h
diff -u llvm/include/llvm/Analysis/FindUsedTypes.h:1.24 llvm/include/llvm/Analysis/FindUsedTypes.h:1.25
--- llvm/include/llvm/Analysis/FindUsedTypes.h:1.24 Thu Apr 21 15:16:31 2005
+++ llvm/include/llvm/Analysis/FindUsedTypes.h Sun May 15 11:13:11 2005
@@ -60,7 +60,7 @@
// 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
Index: llvm/include/llvm/Analysis/LoopInfo.h
diff -u llvm/include/llvm/Analysis/LoopInfo.h:1.46 llvm/include/llvm/Analysis/LoopInfo.h:1.47
--- llvm/include/llvm/Analysis/LoopInfo.h:1.46 Sun May 1 11:22:41 2005
+++ llvm/include/llvm/Analysis/LoopInfo.h Sun May 15 11:13:11 2005
@@ -230,7 +230,8 @@
/// 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 @@
// 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*> {
More information about the llvm-commits
mailing list