Adjust to the changed StructType interface. In particular, getElementTypes() is gone.

llvm-svn: 11228
This commit is contained in:
Chris Lattner
2004-02-09 04:37:31 +00:00
parent 4da68e2d7b
commit ac6db755c3
14 changed files with 56 additions and 66 deletions

View File

@@ -62,7 +62,7 @@ const Type *llvm::getStructOffsetType(const Type *Ty, unsigned &Offset,
uint64_t ThisOffset;
const Type *NextType;
if (const StructType *STy = dyn_cast<StructType>(Ty)) {
if (STy->getElementTypes().empty()) {
if (STy->getNumElements()) {
Offset = 0;
return STy;
}