[PATCH] D130875: [Metadata] Introduce MD_pcsections
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 4 10:50:52 PDT 2022
vitalybuka requested changes to this revision.
vitalybuka added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/IR/MDBuilder.cpp:162
+MDNode *
+MDBuilder::createPCSections(ArrayRef<StringRef> Sections,
+ ArrayRef<ArrayRef<Constant *>> AuxData) {
----------------
There is TEST_F(MDBuilderTest, which can be updated
================
Comment at: llvm/lib/IR/MDBuilder.cpp:166
+
+ for (size_t i = 0; i < Sections.size(); i++) {
+ const StringRef &S = Sections[i];
----------------
is implicit mapping from Sections[i] to AuxData[i] in interface is neccecary?
can you do SomeMap<StringRef, <ArrayRef<Constant *>> ?
That would be cleaner
================
Comment at: llvm/lib/IR/MDBuilder.cpp:174
+ for (Constant *C : AuxConsts) {
+ if (C)
+ Ops.push_back(createConstant(C));
----------------
why do you need nullptr in that array?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130875/new/
https://reviews.llvm.org/D130875
More information about the llvm-commits
mailing list