[PATCH] D125998: [Metadata] Add a resize capability to MDNodes and add a push_back interface to MDNodes.

Wolfgang Pieb via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 22:57:30 PDT 2022


wolfgangp added inline comments.


================
Comment at: llvm/unittests/IR/MetadataTest.cpp:3663
+  for (int i = 0; i < 11; i++)
+    Temp1->push_back(Value2);
+  EXPECT_EQ(Temp1->getNumOperands(), 12u);
----------------
dexonsmith wrote:
> Is this enough to exceed small size? If not, it’s be good to add one that does.
The node is allocated with 0 operands, so it gets resized to a large after only 3 push_backs But we were missing a test for a node that is allocated as a large right away. I added a test for it.


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

https://reviews.llvm.org/D125998



More information about the llvm-commits mailing list