================
@@ -137,15 +136,15 @@ class IRBuilderBase {
public:
IRBuilderBase(LLVMContext &context, const IRBuilderFolder &Folder,
- const IRBuilderDefaultInserter &Inserter)
- : Context(context), Folder(Folder), Inserter(Inserter) {
+ InsertFn InsertCB)
+ : Context(context), Folder(Folder), InsertCB(InsertCB) {
ClearInsertionPoint();
}
/// Insert and return the specified instruction.
template<typename InstTy>
InstTy *Insert(InstTy *I, const Twine &Name = "") const {
- Inserter.InsertHelper(I, Name, InsertPt);
+ InsertCB(*this, I, Name, InsertPt);
----------------
nikic wrote:
Copying IRBuilderBase is just generally unsafe, because it's self-referential.
So yes, we should delete the copy ctor.
(Copy assignment is implicitly deleted anyway.)
https://github.com/llvm/llvm-project/pull/229700
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits