namespace {
/// \brief Helper class which uses a value handler to automatically deletes the
/// memory block when the GlobalVariable is destroyed.
-class GVMemoryBlock : public CallbackVH {
+class GVMemoryBlock final : public CallbackVH {
GVMemoryBlock(const GlobalVariable *GV)
: CallbackVH(const_cast<GlobalVariable*>(GV)) {}
break;
case Type::VectorTyID:
// if the whole vector is 'undef' just reserve memory for the value.
- const VectorType* VTy = dyn_cast<VectorType>(C->getType());
- const Type *ElemTy = VTy->getElementType();
+ auto* VTy = dyn_cast<VectorType>(C->getType());
+ Type *ElemTy = VTy->getElementType();
unsigned int elemNum = VTy->getNumElements();
Result.AggregateVal.resize(elemNum);
if (ElemTy->isIntegerTy())
break;
}
case Type::VectorTyID: {
- const VectorType *VT = cast<VectorType>(Ty);
- const Type *ElemT = VT->getElementType();
+ auto *VT = cast<VectorType>(Ty);
+ Type *ElemT = VT->getElementType();
const unsigned numElems = VT->getNumElements();
if (ElemT->isFloatTy()) {
Result.AggregateVal.resize(numElems);