[PATCH] D57898: CodeGen: Fix PR40605: split constant structures generated by -ftrivial-auto-var-init when emitting initializators

JF Bastien via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 25 14:47:40 PST 2019


jfb added a comment.

I think (with test updates) this will be good to go once D58188 <https://reviews.llvm.org/D58188> lands.



================
Comment at: tools/clang/lib/CodeGen/CGDecl.cpp:1158
+  llvm::StructType *STy = dyn_cast<llvm::StructType>(Ty);
+  if (STy && (STy == Loc.getElementType()) &&
+      shouldSplitStructStore(CGM, ConstantSize)) {
----------------
Can you leave a FIXME here to handle `STY != Loc.getElementType()`, as well as another FIXME to handle non-struct aggregate types such as arrays? I'm happy to do them as a follow-up.


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

https://reviews.llvm.org/D57898





More information about the cfe-commits mailing list