[PATCH] D75661: Remove SequentialType from the type heirarchy.

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 17 15:08:04 PDT 2020


efriedma marked an inline comment as done.
efriedma added a comment.

I looked at getting rid of getSequentialNumElements/getSequentialElementType, but I'm not sure that would actually make the code more clear.  I avoided them in cases where they clearly weren't helpful.



================
Comment at: clang/lib/CodeGen/CGDecl.cpp:1053
     return constStructWithPadding(CGM, isPattern, STy, constant);
-  if (auto *STy = dyn_cast<llvm::SequentialType>(OrigTy)) {
+  if (auto *ArrayTy = dyn_cast<llvm::ArrayType>(OrigTy)) {
     llvm::SmallVector<llvm::Constant *, 8> Values;
----------------
Despite the appearance, this doesn't actually affect the result for vectors: we try to recursively rewrite the elements, but we don't actually support any rewrites for types other than StructType and ArrayType, so the rewrite just produces the input constant.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75661/new/

https://reviews.llvm.org/D75661





More information about the cfe-commits mailing list