This is an archive of the discontinued LLVM Phabricator instance.

[builtins] Add void prototype to unprototyped functions
ClosedPublic

Authored by aykevl on Apr 22 2020, 7:56 AM.

Details

Summary

This patch replaces () prototypes with (void) prototypes, to avoid declaring these functions as variadic functions.


Found while porting compiler-rt to the AVR platform. There are still some Clang bugs where it uses the wrong address space for variadic functions, and this patch works around that. Of course this should also be fixed in Clang, but I think the effort started in D78491 is a much more systematic approach (and will probably take a while until it is finished). Until then, this patch avoids some accidental variadic functions.

Diff Detail

Event Timeline

aykevl created this revision.Apr 22 2020, 7:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2020, 7:56 AM
Herald added subscribers: Restricted Project, dylanmckay. · View Herald Transcript
aykevl edited the summary of this revision. (Show Details)Apr 22 2020, 7:57 AM
MaskRay accepted this revision.Apr 22 2020, 8:14 AM

LGTM. Though hope you can address more issues in one patch.

This revision is now accepted and ready to land.Apr 22 2020, 8:14 AM

Thanks for the review!

LGTM. Though hope you can address more issues in one patch.

Yeah I just fixed things as I went through supporting AVR (D78205 was to get the builtins to compile, this patch was to get the tests to compile). If I find more issues, I'll try to bundle all related changes in one patch.

This revision was automatically updated to reflect the committed changes.