[all-commits] [llvm/llvm-project] c8b2f3: [ObjC] type method metadata `_imp`, messenger rout...
Matt Jacobson via All-commits
all-commits at lists.llvm.org
Thu Aug 4 02:42:44 PDT 2022
Author: Matt Jacobson <mhjacobson at me.com>
Date: 2022-08-04 (Thu, 04 Aug 2022)
[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
More information about the All-commits