[PATCH] D81580: [ADT] Add Bitfield utilities
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 17 02:40:14 PDT 2020
serge-sans-paille added inline comments.
================
Comment at: llvm/unittests/ADT/BitFieldsTest.cpp:21
+ using Bool = Bitfield<bool, 0, 1>;
+ setField<Bool>(Storage, true);
+ EXPECT_EQ(Storage, 0b00000001);
----------------
Would that make sense to use the following syntax instead of the setField method ?
```
Bitfield<bool, 0, 1>(Storage) = true;
```
This would also have the pro of not providing a relatively generic name `setField` in the llvm namespace.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81580/new/
https://reviews.llvm.org/D81580
More information about the llvm-commits
mailing list