[PATCH] D117262: [NFC] Store Address's alignment into PointerIntPairs

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 26 09:57:49 PST 2022


aeubanks added inline comments.


================
Comment at: clang/lib/CodeGen/Address.h:29
+// so we fallback to storing the alignment separately.
+template <typename T, bool = alignof(llvm::Value *) >= 8> class AddressImpl {};
+
----------------
nikic wrote:
> Why do we need the extra T parameter?
without it we end up instantiating `AddressImpl<true>` unconditionally (because all template parameters are known?) which static_asserts in 32 bit builds


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117262



More information about the cfe-commits mailing list