diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-07-09 22:56:53 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2022-01-29 10:01:20 +0100 |
commit | 784e01abca65722df8969b56d2d240cf9ced9c85 (patch) | |
tree | 028bbc5ba32b15ff9435efc049a21bf8b6cad6f0 /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | 8faf2a0638d3e8d9411d55c3e5dfb7b452f35ca2 (diff) | |
download | llvm-784e01abca65722df8969b56d2d240cf9ced9c85.zip llvm-784e01abca65722df8969b56d2d240cf9ced9c85.tar.gz llvm-784e01abca65722df8969b56d2d240cf9ced9c85.tar.bz2 |
[IR] Require matching signature in getCalledFunction()
With opaque pointers, it's possible to directly call a function with
a different signature, without an intermediate bitcast. However,
lot's of code using getCalledFunction() reasonably assumes that the
signatures match (which is always true without opaque pointers).
Add an explicit check to that effect.
The test case is from D105313, where I ran into the problem, but on
further investigation this also affects lots of other code, we just
have little coverage with mismatching signatures. The change from
D105313 is still desirable for other reasons, but this patch
addresses the root problem when it comes to opaque pointers.
Differential Revision: https://reviews.llvm.org/D105733
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions