diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-05-15 16:13:11 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-05-15 16:13:11 +0000 |
commit | edd5d9ece15f73ec1a31423a4ae39774aa6c521c (patch) | |
tree | 0cf64cf1cf786dfc0af67d7f048e4e26a86738d3 /include/llvm/Instructions.h | |
parent | 98a493c7cef0b81d499eae82a1f9b748d5e59eeb (diff) | |
download | external_llvm-edd5d9ece15f73ec1a31423a4ae39774aa6c521c.zip external_llvm-edd5d9ece15f73ec1a31423a4ae39774aa6c521c.tar.gz external_llvm-edd5d9ece15f73ec1a31423a4ae39774aa6c521c.tar.bz2 |
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/Instructions.h')
-rw-r--r-- | include/llvm/Instructions.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 264e8b6..904ca8f 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -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: |