[PATCH] D105733: [OpaquePtr] Require matching signature in getCalledFunction()
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 14 13:47:06 PDT 2021
nikic added a comment.
In D105733#2872599 <https://reviews.llvm.org/D105733#2872599>, @aeubanks wrote:
> intrinsics should always have matching arguments/signatures, we should perhaps have a verifier check for that?
That sounds reasonable to me. Intrinsic calls are always required to be direct, so verifying the signature should be safe and will help prevent mistakes. Implemented in D106013 <https://reviews.llvm.org/D106013>.
> is this going to return null for vararg function calls now?
>
> perhaps we could see if `getCalledFunction()` now returns null where previously it wouldn't on anything in e.g. llvm-test-suite/spec/etc
Just to be sure I replaced the new check with an assertion, and as expected it doesn't fire on test-suite. If it did, that would imply broken IR (with typed pointers).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105733/new/
https://reviews.llvm.org/D105733
More information about the llvm-commits
mailing list