diff options
Diffstat (limited to 'llvm/lib/VMCore')
-rw-r--r-- | llvm/lib/VMCore/Constants.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/VMCore/Type.cpp | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index 8f62a71bbd1..bb8fa655565 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -1070,7 +1070,8 @@ private: } typename MapTy::iterator I = - Map.find(MapKey((TypeClass*)CP->getRawType(), getValType(CP))); + Map.find(MapKey(static_cast<const TypeClass*>(CP->getRawType()), + getValType(CP))); if (I == Map.end() || I->second != CP) { // FIXME: This should not use a linear scan. If this gets to be a // performance problem, someone should look at this. diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp index a05f911e83f..b7bf339ab8d 100644 --- a/llvm/lib/VMCore/Type.cpp +++ b/llvm/lib/VMCore/Type.cpp @@ -84,9 +84,9 @@ void Type::destroy() const { // Now call the destructor for the subclass directly because we're going // to delete this as an array of char. if (isa<FunctionType>(this)) - ((FunctionType*)this)->FunctionType::~FunctionType(); + static_cast<const FunctionType*>(this)->FunctionType::~FunctionType(); else - ((StructType*)this)->StructType::~StructType(); + static_cast<const StructType*>(this)->StructType::~StructType(); // Finally, remove the memory as an array deallocation of the chars it was // constructed from. |