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

@@ -519,7 +519,7 @@ public:
/// if it is a direct call. If it is a call through a function pointer,
/// return null.
Function *getCalledFunction() const {
return (Function*)dyn_cast<Function>(getOperand(0));
return static_cast<Function*>(dyn_cast<Function>(getOperand(0)));
}
// getCalledValue - Get a pointer to a method that is invoked by this inst.
@@ -1153,7 +1153,7 @@ public:
// successor.
inline ConstantInt *getSuccessorValue(unsigned idx) const {
assert(idx < getNumSuccessors() && "Successor # out of range!");
return (ConstantInt*)getOperand(idx*2);
return reinterpret_cast<ConstantInt*>(getOperand(idx*2));
}
// Methods for support type inquiry through isa, cast, and dyn_cast: