[PATCH] D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder.

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 19 13:52:19 PDT 2020


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

LGTM



================
Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1847
+        IsIncompleteArrayType ? CharUnits::Zero() : TI.first;
+    AlignIsRequired = Context.getTypeInfo(D->getType()).AlignIsRequired;
   };
----------------
ebevhan wrote:
> efriedma wrote:
> > Can we fix getTypeInfoInChars so it returns all the necessary info, so we don't look up the typeinfo twice?
> That feels like a hefty change since it would require changing every caller of getTypeInfoInChars. Do you want me to do that in this patch or in a separate one?
Separate patch makes sense.

If you want to do it after this one, that's fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85191



More information about the cfe-commits mailing list