[PATCH] D78125: [AVR] Use the correct address space for non-prototyped function calls

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 14 20:40:13 PDT 2020


rjmccall added inline comments.


================
Comment at: clang/test/CodeGen/address-space-avr.c:3
+
+// CHECK: define void @bar() addrspace(1)
+// CHECK: call addrspace(1) void bitcast (void (...) addrspace(1)* @foo to void (i16) addrspace(1)*)(i16 3)
----------------
MaskRay wrote:
> Add a comment what happens here?
Yeah, it'd be nice to add a comment like "Test that we call unprototyped functions from nonzero address spaces correctly."  When we drop element types from pointer types, this code will need to change: `FunctionPointer` will start carrying an `llvm::FunctionType*` directly, and this code will just change that type instead of creating a bitcast.  But it will still be important to test that we handle function pointers in non-zero address spaces correctly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78125





More information about the cfe-commits mailing list