[PATCH] D26595: IR: Change PointerType to derive from Type rather than SequentialType.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 21 14:59:56 PST 2016
dblaikie added inline comments.
================
Comment at: llvm/include/llvm/IR/DerivedTypes.h:316
Type *ContainedType; ///< Storage for the single contained type.
+ uint64_t NumElements;
SequentialType(const SequentialType &) = delete;
----------------
Might be best to save the refactoring here for a separate patch - make things a bit easier to follow (ie: which bit makes PointerType not a SequentialType, and then which things are improvements now that all SequentialTypes have numElements, etc).
Maybe. Open to debate/discussion/disagreement for sure.
================
Comment at: llvm/include/llvm/IR/DerivedTypes.h:454-457
+ Type *getElementType() const {
+ return PointeeTy;
+ }
+
----------------
This should make it much easier for me to test how the typeless pointer work is progressing (previously I had to do a dynamic check in SequentialType::getElementType (assert(!isa<PointerType>) basically). Handy :)
https://reviews.llvm.org/D26595
More information about the llvm-commits
mailing list