void Lint::visitIndirectBrInst(IndirectBrInst &I) { visitMemoryReference(I, I.getAddress(), MemoryLocation::UnknownSize, 0, nullptr, MemRef::Branchee); Assert(I.getNumDestinations() != 0, "Undefined behavior: indirectbr with no destinations", &I); }
void LLVM_General_GetIndirectBrDests( LLVMValueRef v, LLVMBasicBlockRef *dests ) { IndirectBrInst *ib = unwrap<IndirectBrInst>(v); for(unsigned i=0; i != ib->getNumDestinations(); ++i, ++dests) *dests = wrap(ib->getDestination(i)); }