[llvm] [C API] Add blockaddress getters to C API (PR #77390)

Benji Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 16:37:07 PST 2024


Benjins wrote:

I have pushed some changes to deal with unnamed basic blocks. From my understanding, `blockaddress` constants can only reference unnamed basic blocks that are in the same function. So to support that case, we clone them inside the `FunCloner` (which has access to the `BBMap` needed to look up unnamed basic blocks), or outside functions in which case we can only clone them by name as the previous version of the PR did. This also means that we only pre-declare named basic blocks, and unnamed ones are lazily cloned in `DeclareBB` as before

I added a couple more tests, for unnamed local basic blocks, and a global `blockaddress` constant. I decided to move these to a dedicated test file since they were getting to be more substantial

https://github.com/llvm/llvm-project/pull/77390


More information about the llvm-commits mailing list