With call support in place, this is only a matter of relaxing a
bitcode reader assertion.
cast<PointerType>(Callee->getType())->getElementType());
if (!FTy)
return error("Callee is not of pointer to function type");
- } else if (cast<PointerType>(Callee->getType())->getElementType() != FTy)
+ } else if (!CalleeTy->isOpaqueOrPointeeTypeMatches(FTy))
return error("Explicit invoke type does not match pointee type of "
"callee operand");
if (Record.size() < FTy->getNumParams() + OpNum)
call void %p(i32 %a)
ret void
}
+
+; CHECK: define void @invoke(ptr %p) personality void ()* @personality {
+; CHECK: invoke void %p()
+; CHECK: to label %continue unwind label %cleanup
+declare void @personality()
+define void @invoke(ptr %p) personality void ()* @personality {
+ invoke void %p()
+ to label %continue unwind label %cleanup
+
+continue:
+ ret void
+
+cleanup:
+ landingpad {}
+ cleanup
+ ret void
+}