[PATCH] D105733: [OpaquePtr] Require matching signature in getCalledFunction()

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 14 15:40:39 PDT 2021


dexonsmith added a comment.

In D105733#2878489 <https://reviews.llvm.org/D105733#2878489>, @dexonsmith wrote:

> As per https://reviews.llvm.org/D106013#2878472, I wonder...

@nikic reminded me that pointers-to-functions don't have bitcasts anymore (I was confused and thinking there were just fewer, from the collapse of pointer parameters). (Thanks for your patience while I worked through this!)

I still wonder if it'd be better to

- rename this function first (maybe `getCalledFunctionIfSameType()` or similar) in a prep patch -- making its behaviour clear in the name, and making the logical holes in callers obvious
- then land this patch to make it behave the same way for opaque pointers
- ... but leave it for later/separate work to add back a `getCalledFunction()` that actually does what (most) callers expect and move callers over to it

WDYT?

(If others think it's better to just go forward with this patch as-is for now, I'm fine with that too.)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105733/new/

https://reviews.llvm.org/D105733



More information about the llvm-commits mailing list