[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 3 11:41:39 PDT 2020


efriedma added inline comments.


================
Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1778
-    std::pair<CharUnits, CharUnits> FieldInfo =
-      Context.getTypeInfoInChars(D->getType());
-    EffectiveFieldSize = FieldSize = FieldInfo.first;
----------------
ebevhan wrote:
> It seems that in factoring out this to setDeclInfo, it was changed from using getTypeInfoInChars to using getTypeInfo+toCharUnitsFromBits. This is causing some downstream issues for us with non-bytesize-multiple types.
> 
> Changing setDeclInfo to use the original function instead seems to work without issues. Would it be acceptable to change this?
In general, we want to avoid representing type size/alignment in bits where it isn't necessary; refactoring along those lines is welcome.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79719



More information about the cfe-commits mailing list