diff options
| author | Vasileios Porpodas <vporpodas@google.com> | 2022-12-14 13:29:10 -0800 |
|---|---|---|
| committer | Vasileios Porpodas <vporpodas@google.com> | 2022-12-14 14:52:02 -0800 |
| commit | 8580de156f2bceebd31d884a5217f936a7da1ea6 (patch) | |
| tree | 675d4a9b72a520f8ec5419267b9235fb445896ea /llvm/examples/ModuleMaker/ModuleMaker.cpp | |
| parent | 21a3447564735833909b14b681454997991f35f8 (diff) | |
[NFC] Fixes ModuleMaker example build failure caused by c143b77b30fc23f70aac94be66e412651771c0fc
Differential Revision: https://reviews.llvm.org/D140052
Diffstat (limited to 'llvm/examples/ModuleMaker/ModuleMaker.cpp')
| -rw-r--r-- | llvm/examples/ModuleMaker/ModuleMaker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/examples/ModuleMaker/ModuleMaker.cpp b/llvm/examples/ModuleMaker/ModuleMaker.cpp index e409dd60e9b0..033f91d0830f 100644 --- a/llvm/examples/ModuleMaker/ModuleMaker.cpp +++ b/llvm/examples/ModuleMaker/ModuleMaker.cpp @@ -55,10 +55,10 @@ int main() { "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()); |
