[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
Tue Aug 18 13:19:13 PDT 2020


efriedma added a comment.

I'm still concerned your approach to the computation of getTypeSize() is a ticking time bomb, but I'll take the cleanup even if the underlying motivation doesn't really make sense.



================
Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1847
+        IsIncompleteArrayType ? CharUnits::Zero() : TI.first;
+    AlignIsRequired = Context.getTypeInfo(D->getType()).AlignIsRequired;
   };
----------------
Can we fix getTypeInfoInChars so it returns all the necessary info, so we don't look up the typeinfo twice?


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