HomePhabricator

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

Authored by aykevl on Apr 14 2020, 9:13 AM.

Description

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

Some function declarations like this:

void foo();

do not have a type declaration, for that you'd use:

void foo(void);

Clang internally bitcasts the variadic function declaration to a
function pointer, but doesn't use the correct address space on AVR. This
commit fixes that.

This fix is necessary to let Clang compile compiler-rt for AVR.

Differential Revision: https://reviews.llvm.org/D78125

Details