Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
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));
}