diff options
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r-- | lib/Target/TargetData.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index b11ef0438a..09bc6009dc 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -151,7 +151,7 @@ unsigned TargetData::getIndexedOffset(const Type *ptrTy, unsigned Result = 0; // Get the type pointed to... - const Type *Ty = PtrTy->getValueType(); + const Type *Ty = PtrTy->getElementType(); for (unsigned CurIDX = 0; CurIDX < Idx.size(); ++CurIDX) { if (const StructType *STy = dyn_cast<const StructType>(Ty)) { |