[PATCH] D140052: [NFC] Fixes example build failure caused by c143b77b30fc23f70aac94be66e412651771c0fc

Vasileios Porpodas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 13:30:55 PST 2022


vporpo created this revision.
Herald added a project: All.
vporpo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140052

Files:
  llvm/examples/ModuleMaker/ModuleMaker.cpp


Index: llvm/examples/ModuleMaker/ModuleMaker.cpp
===================================================================
--- llvm/examples/ModuleMaker/ModuleMaker.cpp
+++ llvm/examples/ModuleMaker/ModuleMaker.cpp
@@ -55,10 +55,10 @@
                                             "addresult");
 
   // explicitly insert it into the basic block...
-  BB->getInstList().push_back(Add);
+  Add->insertAt(BB, BB->end());
 
   // Create the return instruction and add it to the basic block
-  BB->getInstList().push_back(ReturnInst::Create(Context, Add));
+  ReturnInst::Create(Context, Add)->insertAt(BB, BB->end());
 
   // Output the bitcode file to stdout
   WriteBitcodeToFile(*M, outs());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140052.482978.patch
Type: text/x-patch
Size: 684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221214/3787e462/attachment.bin>


More information about the llvm-commits mailing list