[PATCH] D94979: [CGExpr] Use getCharWidth() more consistently in CCGExprConstant. NFC

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 21 11:38:00 PST 2021


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

Clang has generally made a point of trying to be as neutral about `CHAR_BITS` as it can be, even though LLVM has not.  As the code owner of this code, I view this as a fix consistent with that, and I consider it acceptable to land.

Of course, if you are pursuing these patches out of an expectation that you'll eventually get Clang to support compiling targets with non-8-bit-addressing, you need to understand that (at least for most cases) that depends on LLVM supporting such targets, and so far the LLVM community has been pretty strongly opposed to that idea.  But Clang has *internally* already accepted the abstraction costs of `CharUnits`, and we should to be as consistent as possible about that in our own code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94979



More information about the cfe-commits mailing list