[PATCH] D148360: [Propeller] Use a bit-field struct for the metdata fields of BBEntry.

Rahman Lavaee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 12:02:28 PDT 2023


rahmanl added inline comments.


================
Comment at: llvm/unittests/Object/ELFTypesTest.cpp:66
+TEST(ELFTypesTest, BBEntryMetadataEncodingTest) {
+  static const std::array<BBAddrMap::BBEntry::Metadata, 6> Decoded = {
+      {{false, false, false, false},
----------------
jhenderson wrote:
> It might be interesting to show what happens when you provide `decode` with a value that includes bits that aren't related to any of the properties. For example, 0xffffffff.
Good point. I added a check to enforce 1-to-1 encoding. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148360



More information about the llvm-commits mailing list