[PATCH] D159418: Move CallInst::CreateFree to IRBuilderBase
Konrad Wilhelm Kleine via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 02:55:47 PDT 2023
kwk marked an inline comment as done.
kwk added inline comments.
================
Comment at: llvm/examples/BrainF/BrainF.cpp:129
+ // call free(i8 *%arr)
+ builder->SetInsertPoint(endbb->end());
+ builder->CreateFree(ptr_arr);
----------------
nikic wrote:
> I don't think this is going to compile. Should be something like `builder->SetInsertPoint(endbb);`
>
> You probably need to pass `-DLLVM_BUILD_EXAMPLES=ON` to cmake to build this code.
I have this setting on -DLLVM_BUILD_EXAMPLES=ON`:
```
$ grep LLVM_BUILD_EXAMPLES CMakeCache.txt
LLVM_BUILD_EXAMPLES:STRING=On
//Path for examples subdirectory (enabled by LLVM_BUILD_EXAMPLES=ON)
```
But I have changed it to what you wanted.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159418/new/
https://reviews.llvm.org/D159418
More information about the llvm-commits
mailing list