mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user