[PATCH] D83248: [NFCI][IR] Introduce CallBase::Create() wrapper

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 6 12:14:21 PDT 2020


nickdesaulniers accepted this revision.
nickdesaulniers added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/include/llvm/IR/InstrTypes.h:1145
+  static CallBase *Create(CallBase *CB, ArrayRef<OperandBundleDef> Bundles,
+                          Instruction *InsertPt = nullptr);
+
----------------
lebedev.ri wrote:
> nickdesaulniers wrote:
> > No call sites make use of this default value (`nullptr`). Is it the right value?  I'm not sure if you can default it to `CB`, but if not, should it just be a required parameter with no default value?
> This is a direct wrapper over all the subclasses `Create()` function with the same signature.
> They all follow this pattern. I'm not sure why we should deviate here.
Ah, I missed the use in the child patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83248





More information about the llvm-commits mailing list