Mercurial > hg > CbC > CbC_llvm
diff llvm/examples/ModuleMaker/ModuleMaker.cpp @ 252:1f2b6ac9f198 llvm-original
LLVM16-1
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 18 Aug 2023 09:04:13 +0900 |
parents | 1d019706d866 |
children |
line wrap: on
line diff
--- a/llvm/examples/ModuleMaker/ModuleMaker.cpp Wed Nov 09 17:47:54 2022 +0900 +++ b/llvm/examples/ModuleMaker/ModuleMaker.cpp Fri Aug 18 09:04:13 2023 +0900 @@ -55,10 +55,10 @@ "addresult"); // explicitly insert it into the basic block... - BB->getInstList().push_back(Add); + Add->insertInto(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)->insertInto(BB, BB->end()); // Output the bitcode file to stdout WriteBitcodeToFile(*M, outs());