aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorMatt Jacobson <mhjacobson@me.com>2022-08-01 01:59:41 -0400
committerMatt Jacobson <mhjacobson@me.com>2022-08-04 05:40:32 -0400
commitc8b2f3f51bd923afbf9d3ebd0823bce895629630 (patch)
tree1caeaa6bdce387c0b9661d45be604d055bed17f9 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent56d94b3b902e21ff79b1ce9a6fb606a3f7c1c4db (diff)
downloadllvm-c8b2f3f51bd923afbf9d3ebd0823bce895629630.zip
llvm-c8b2f3f51bd923afbf9d3ebd0823bce895629630.tar.gz
llvm-c8b2f3f51bd923afbf9d3ebd0823bce895629630.tar.bz2
[ObjC] type method metadata `_imp`, messenger routine at callsite with program address space
On targets with non-default program address space (e.g., Harvard architectures), clang crashes when emitting Objective-C method metadata, because the address of the method IMP cannot be bitcast to i8*. It similarly crashes at messenger callsite with a failed bitcast. Define the _imp field instead as i8 addrspace(1)* (or whatever the target's program address space is). And in getMessageSendInfo(), create signatureType by specifying the program address space. Add a regression test using the AVR target. Test failed previously and passes now. Checked codegen of the test for x86_64-apple-darwin19.6.0 and saw no difference, as expected. Reviewed By: rjmccall, dylanmckay Differential Revision: https://reviews.llvm.org/D112113
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions