Commit more code over to new cast style


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@697 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bytecode/Reader/ConstantReader.cpp b/lib/Bytecode/Reader/ConstantReader.cpp
index aaecedd..4c7f7c9 100644
--- a/lib/Bytecode/Reader/ConstantReader.cpp
+++ b/lib/Bytecode/Reader/ConstantReader.cpp
@@ -229,7 +229,7 @@
     abort();
 
   case Type::ArrayTyID: {
-    const ArrayType *AT = (const ArrayType*)Ty;
+    const ArrayType *AT = cast<const ArrayType>(Ty);
     unsigned NumElements;
     if (AT->isSized())          // Sized array, # elements stored in type!
       NumElements = (unsigned)AT->getNumElements();
@@ -249,7 +249,7 @@
   }
 
   case Type::StructTyID: {
-    const StructType *ST = Ty->castStructType();
+    const StructType *ST = cast<StructType>(Ty);
     const StructType::ElementTypes &ET = ST->getElementTypes();
 
     vector<ConstPoolVal *> Elements;
@@ -267,7 +267,7 @@
   }    
 
   case Type::PointerTyID: {
-    const PointerType *PT = Ty->castPointerType();
+    const PointerType *PT = cast<const PointerType>(Ty);
     unsigned SubClass;
     if (read_vbr(Buf, EndBuf, SubClass)) return failure(true);
     if (SubClass != 0) return failure(true);