Convert more code to use new style casts
Eliminate old style casts from value.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@696 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bytecode/Reader/ConstantReader.cpp b/lib/Bytecode/Reader/ConstantReader.cpp
index 67cfff7..aaecedd 100644
--- a/lib/Bytecode/Reader/ConstantReader.cpp
+++ b/lib/Bytecode/Reader/ConstantReader.cpp
@@ -241,8 +241,8 @@
       unsigned Slot;
       if (read_vbr(Buf, EndBuf, Slot)) return failure(true);
       Value *V = getValue(AT->getElementType(), Slot, false);
-      if (!V || !V->isConstant()) return failure(true);
-      Elements.push_back((ConstPoolVal*)V);
+      if (!V || !isa<ConstPoolVal>(V)) return failure(true);
+      Elements.push_back(cast<ConstPoolVal>(V));
     }
     V = ConstPoolArray::get(AT, Elements);
     break;
@@ -257,9 +257,9 @@
       unsigned Slot;
       if (read_vbr(Buf, EndBuf, Slot)) return failure(true);
       Value *V = getValue(ET[i], Slot, false);
-      if (!V || !V->isConstant())
+      if (!V || !isa<ConstPoolVal>(V))
 	return failure(true);
-      Elements.push_back((ConstPoolVal*)V);      
+      Elements.push_back(cast<ConstPoolVal>(V));      
     }
 
     V = ConstPoolStruct::get(ST, Elements);