[PATCH] D138295: [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 30 10:22:11 PST 2022


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

LGTM



================
Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1917
+    EffectiveFieldSize = FieldSize = TI.Width;
+    FieldAlign = TI.Align;
   } else {
----------------
arichardson wrote:
> arichardson wrote:
> > rjmccall wrote:
> > > This is a nice cleanup, but I actually can't figure out why we can't just fall into the code below.
> > It looks like this dates back to `Add a new ASTRecordLayoutBuilder class. Not used yet.` from 2009. Maybe `ReferenceType`s were not handled correctly by `Context.getTypeInfoInChars(RT);` back then?
> I've removed the special case now and it looks like all tests are passing, so I believe this is indeed no longer needed.
Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138295



More information about the cfe-commits mailing list