Add more support for new style casts

Convert more code to use them


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@695 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-10-01 18:26:53 +00:00
parent 9636a91649
commit cfe26c930a
23 changed files with 145 additions and 94 deletions

View File

@@ -1525,8 +1525,8 @@ GetInstructionsByRule(InstructionNode* subtreeRoot,
case 208: // stmt: BrCond(boolconst)
{
// boolconst => boolean is a constant; use BA to first or second label
ConstPoolVal* constVal =
subtreeRoot->leftChild()->getValue()->castConstantAsserting();
ConstPoolVal* constVal =
cast<ConstPoolVal>(subtreeRoot->leftChild()->getValue());
unsigned dest = ((ConstPoolBool*) constVal)->getValue()? 0 : 1;
mvec[0] = new MachineInstr(BA);

View File

@@ -61,7 +61,7 @@ Annotation *TargetData::TypeAnFactory(AnnotationID AID, const Annotable *T,
void *D) {
const TargetData &TD = *(const TargetData*)D;
assert(AID == TD.AID && "Target data annotation ID mismatch!");
const Type *Ty = ((const Value *)T)->castTypeAsserting();
const Type *Ty = cast<const Type>((const Value *)T);
assert(Ty->isStructType() &&
"Can only create StructLayout annotation on structs!");
return new StructLayout((const StructType *)Ty, TD);