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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to