[PATCH] D64790: [LLVM][NFC] Adding an Alignment type to LLVM
JF Bastien via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 17:16:01 PDT 2019
jfb added inline comments.
================
Comment at: llvm/include/llvm/Support/Alignment.h:40
+// It is suitable for use as static global constants.
+struct Align final {
+private:
----------------
`final` is kinda weird here. Not that I'd inherit from this... but why have `final`?
================
Comment at: llvm/include/llvm/Support/Alignment.h:146
+// Returns unsigned(-1) if current alignment is undefined.
+inline unsigned Log2(MaybeAlign A) { return A ? Log2(A.getValue()) : -1; }
+
----------------
Are the places where `Log2` with undefined alignment is called today? Can we report fatal error instead (or assert)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64790/new/
https://reviews.llvm.org/D64790
More information about the llvm-commits
mailing list