Assert on polymorphic pointer intrinsic param
authorThomas Preud'homme <thomasp@graphcore.ai>
Tue, 17 May 2022 10:47:43 +0000 (11:47 +0100)
committerThomas Preud'homme <thomasp@graphcore.ai>
Wed, 18 May 2022 13:35:49 +0000 (14:35 +0100)
commit8c975eac34347aec1911a90ca07926f1d6325d8a
treef35829223e52170a63295f2d3fb1310daf5e6df4
parent8e4c5d9902139b900c702721f087f46befef72e8
Assert on polymorphic pointer intrinsic param

Opaque pointers cannot be polymorphic on the pointed type given their
lack thereof. However they are currently accepted by tablegen but the
intrinsic signature verifier trips when verifying any further
polymorphic type because the opaque pointer codepath for pointers will
not push the pointed type in ArgTys.

This commit adds an assert to easily catch such cases instead of having
the generic signature match failure.

Reviewed By: #opaque-pointers, nikic

Differential Revision: https://reviews.llvm.org/D125764
llvm/lib/IR/Function.cpp