[PATCH] D105423: Add support for Opaque as a LowLevelType
Thomas Lively via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 19 15:08:47 PDT 2021
tlively added a comment.
Looks good beyond these clarification questions! It would also be good to update the revision title and description.
================
Comment at: llvm/include/llvm/Support/LowLevelTypeImpl.h:124
- bool isValid() const { return RawData != 0; }
+ bool isValid() const { return IsScalar || RawData != 0; }
----------------
Are pointers or vectors with `RawData == 0` invalid as well?
================
Comment at: llvm/include/llvm/Support/LowLevelTypeImpl.h:127
+ bool isScalar() const {
+ return isValid() && IsScalar && !IsPointer && !IsVector;
+ }
----------------
Why isn't it sufficient to do `return IsScalar`? If `isScalar()` and `IsScalar` have different meanings, could that be clarified in the names?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105423/new/
https://reviews.llvm.org/D105423
More information about the llvm-commits
mailing list