Adjust to the changed StructType interface. In particular, getElementTypes() is...
[oota-llvm.git] / lib / Transforms / TransformInternals.cpp
index eb20544344b4b272bc4f445ad4aeafe7c81b3a71..9039f5909543fa4a576dd965c46d222b4cae9da6 100644 (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;
     }