llvm-project/clang/test/CodeGen/avr
Matt Jacobson c8b2f3f51b [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
2022-08-04 05:40:32 -04:00
..
attributes
address-space-avr.c [OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC) 2022-04-07 12:09:47 +02:00
alias-avr.c [OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC) 2022-04-07 12:09:47 +02:00
argument.c [clang][AVR] Implement standard calling convention for AVR and AVRTiny 2022-03-24 02:08:22 +00:00
avr-builtins.c [clang][NFC] Move all avr CodeGen tests to avr specific directory 2022-02-25 00:23:46 +00:00
avr-flash.c [clang][NFC] Move all avr CodeGen tests to avr specific directory 2022-02-25 00:23:46 +00:00
avr-inline-asm-constraints.c [clang][NFC] Move all avr CodeGen tests to avr specific directory 2022-02-25 00:23:46 +00:00
avr-unsupported-inline-asm-constraints.c [clang][NFC] Move all avr CodeGen tests to avr specific directory 2022-02-25 00:23:46 +00:00
functionptr-addrspace.c [OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC) 2022-04-07 12:09:47 +02:00
objc-method.m [ObjC] type method metadata `_imp`, messenger routine at callsite with program address space 2022-08-04 05:40:32 -04:00
struct.c [OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC) 2022-04-07 12:09:47 +02:00