[PATCH] D90127: [clang][NFC] Rearrange Comment Token and Lexer fields to reduce padding

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 26 03:51:02 PDT 2020


njames93 added inline comments.


================
Comment at: clang/include/clang/AST/CommentLexer.h:244
+  /// command, including command marker.
+  SmallString<16> VerbatimBlockEndCommandName;
+
----------------
gribozavr2 wrote:
> I'm not a fan of this change to `Lexer` because it breaks the grouping of fields: `VerbatimBlockEndCommandName` is no longer next to `State`.
> 
> There is only ever one `Lexer` class instance anyway, so any memory savings are not important I think.
Fair point, I've fixed that grouping of fields while keeping the smaller size, but if you think its still not worth it, I'll revert that change.
The token class size change would be worth it as they appear in vectors.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90127



More information about the cfe-commits mailing list