summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetData.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/Target/TargetData.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/Target/TargetData.cpp')
-rw-r--r--llvm/lib/Target/TargetData.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp
index 24a5e852a21..0b4dc98233c 100644
--- a/llvm/lib/Target/TargetData.cpp
+++ b/llvm/lib/Target/TargetData.cpp
@@ -147,14 +147,14 @@ unsigned char TargetData::getTypeAlignment(const Type *Ty) const {
unsigned TargetData::getIndexedOffset(const Type *ptrTy,
const vector<ConstPoolVal*> &Idx) const {
- const PointerType *PtrTy = ptrTy->castPointerType();
+ const PointerType *PtrTy = cast<const PointerType>(ptrTy);
unsigned Result = 0;
// Get the type pointed to...
const Type *Ty = PtrTy->getValueType();
for (unsigned CurIDX = 0; CurIDX < Idx.size(); ++CurIDX) {
- if (const StructType *STy = Ty->dyncastStructType()) {
+ if (const StructType *STy = dyn_cast<const StructType>(Ty)) {
assert(Idx[CurIDX]->getType() == Type::UByteTy && "Illegal struct idx");
unsigned FieldNo = ((ConstPoolUInt*)Idx[CurIDX++])->getValue();
@@ -168,7 +168,7 @@ unsigned TargetData::getIndexedOffset(const Type *ptrTy,
// Update Ty to refer to current element
Ty = STy->getElementTypes()[FieldNo];
- } else if (const ArrayType *ATy = Ty->dyncastArrayType()) {
+ } else if (const ArrayType *ATy = dyn_cast<const ArrayType>(Ty)) {
assert(0 && "Loading from arrays not implemented yet!");
} else {
assert(0 && "Indexing type that is not struct or array?");
OpenPOWER on IntegriCloud