[PATCH] D16282: [opaque pointer types] [NFC] DataLayout::getIndexedOffset: take source element type instead of pointer type and rename to getIndexedOffsetInType.

Manuel Jacob via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 18:56:17 PST 2016


mjacob accepted this revision.
mjacob added a comment.
This revision is now accepted and ready to land.

LGTM


================
Comment at: lib/IR/DataLayout.cpp:750
@@ -753,5 +749,3 @@
     } else {
-      // Update Ty to refer to current element
-      Ty = cast<SequentialType>(Ty)->getElementType();
-
+      Type *Ty = GTI.getIndexedType();
       // Get the array index and the size of each array element.
----------------
You could inline this variable.


http://reviews.llvm.org/D16282





More information about the llvm-commits mailing list