[PATCH] D50630: [AST] Update/correct the static_asserts for the bit-fields in Type

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 14 03:27:29 PDT 2018


riccibruno added a comment.

I actually have patches for TemplateSpecializationType, PackExpansionType,
DependentTemplateSpecializationType and SubstTemplateTypeParmPackType which move
the unsigned to the bit-fields in Type. The same could be done for the others I suppose.
This assume that the bit-fields of Type have 64 bits available though.

An other one is in ElaboratedType: the member "TagDecl *OwnedTagDecl" is very
commonly null (IIRC only non-null for about 600 of the 66k ElaboratedTypes when
parsing all of Boost). Therefore we can simply put it in a trailing object
and stash a bit in the bit-fields of Type indicating when this pointer is null.

Bruno


Repository:
  rC Clang

https://reviews.llvm.org/D50630





More information about the cfe-commits mailing list