aboutsummaryrefslogtreecommitdiff
path: root/lib/Target
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/SparcV9/SparcV9InstrSelection.cpp4
-rw-r--r--lib/Target/TargetData.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/SparcV9/SparcV9InstrSelection.cpp b/lib/Target/SparcV9/SparcV9InstrSelection.cpp
index e7cdbc0389..572e1b175b 100644
--- a/lib/Target/SparcV9/SparcV9InstrSelection.cpp
+++ b/lib/Target/SparcV9/SparcV9InstrSelection.cpp
@@ -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);
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index e1415c73e8..24a5e852a2 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -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);