[LLVMdev] llvm-c API and well formed block
Gordon Henriksen
gordonhenriksen at me.com
Fri Dec 19 08:42:02 PST 2008
On 2008-12-19, at 09:18, Seo Sanghyeon wrote:
> How can I find out, in llvm-c API, whether a basic block is well
> formed? In C++ I could call getTerminator and test for NULL.
There's not currently a binding for this. In general, there's
incomplete support for inspection and analysis through the C bindings.
BasicBlock::getTerminator() is just a convenient way to spell for
dyn_cast<Terminator>(*--BB->end()). Adding bindings for isa<> would be
the way I'd prefer to approach this, since that would be most broadly
useful. But if your only introspection need is for
BasicBlock::getTerminator, we could add bindings for that to be
expedient.
— Gordon
More information about the llvm-dev
mailing list