mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-04 19:17:12 +00:00
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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user