summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-02 03:41:24 +0000
committerChris Lattner <sabre@nondot.org>2001-10-02 03:41:24 +0000
commitda5581066696da706444b83a5729ea08b9190cd1 (patch)
tree2079bd1429d6b16c94df71bc918fe1f624aa3f2f /llvm/lib/Bytecode/Writer/ConstantWriter.cpp
parent38569343868ee3dad90dcdddfb9fee1ca0bcf25f (diff)
downloadbcm5719-llvm-da5581066696da706444b83a5729ea08b9190cd1.tar.gz
bcm5719-llvm-da5581066696da706444b83a5729ea08b9190cd1.zip
Commit more code over to new cast style
llvm-svn: 697
Diffstat (limited to 'llvm/lib/Bytecode/Writer/ConstantWriter.cpp')
-rw-r--r--llvm/lib/Bytecode/Writer/ConstantWriter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Bytecode/Writer/ConstantWriter.cpp b/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
index dde47d52b11..d0c58f1ae6d 100644
--- a/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
+++ b/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
@@ -23,7 +23,7 @@ void BytecodeWriter::outputType(const Type *T) {
switch (T->getPrimitiveID()) { // Handle derived types now.
case Type::MethodTyID: {
- const MethodType *MT = (const MethodType*)T;
+ const MethodType *MT = cast<const MethodType>(T);
int Slot = Table.getValSlot(MT->getReturnType());
assert(Slot != -1 && "Type used but not available!!");
output_vbr((unsigned)Slot, Out);
@@ -46,7 +46,7 @@ void BytecodeWriter::outputType(const Type *T) {
}
case Type::ArrayTyID: {
- const ArrayType *AT = (const ArrayType*)T;
+ const ArrayType *AT = cast<const ArrayType>(T);
int Slot = Table.getValSlot(AT->getElementType());
assert(Slot != -1 && "Type used but not available!!");
output_vbr((unsigned)Slot, Out);
@@ -57,7 +57,7 @@ void BytecodeWriter::outputType(const Type *T) {
}
case Type::StructTyID: {
- const StructType *ST = (const StructType*)T;
+ const StructType *ST = cast<const StructType>(T);
// Output all of the element types...
StructType::ElementTypes::const_iterator I = ST->getElementTypes().begin();
@@ -73,7 +73,7 @@ void BytecodeWriter::outputType(const Type *T) {
}
case Type::PointerTyID: {
- const PointerType *PT = (const PointerType*)T;
+ const PointerType *PT = cast<const PointerType>(T);
int Slot = Table.getValSlot(PT->getValueType());
assert(Slot != -1 && "Type used but not available!!");
output_vbr((unsigned)Slot, Out);
@@ -91,7 +91,7 @@ void BytecodeWriter::outputType(const Type *T) {
bool BytecodeWriter::outputConstant(const ConstPoolVal *CPV) {
switch (CPV->getType()->getPrimitiveID()) {
case Type::BoolTyID: // Boolean Types
- if (((const ConstPoolBool*)CPV)->getValue())
+ if (cast<const ConstPoolBool>(CPV)->getValue())
output_vbr((unsigned)1, Out);
else
output_vbr((unsigned)0, Out);
OpenPOWER on IntegriCloud