[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 14:52:45 PST 2022


This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8580de156f2b: [NFC] Fixes ModuleMaker example build failure caused by… (authored by vporpo).

Repository:
  rG LLVM Github Monorepo

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

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.483005.patch
Type: text/x-patch
Size: 684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221214/c5d1968d/attachment.bin>


More information about the llvm-commits mailing list