This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget][amdgpu][nfc] Make API harder to misimplement
Needs ReviewPublic

Authored by JonChesterfield on Dec 17 2021, 4:00 PM.

Details

Summary

Refactors the dlwrap.h header and then uses it to implement compiler
checks that the plugin implements the functions defined in omptargetplugin.h.

For symbols marked with EXPORT(), misspelled names, incorrect arity and type
errors are now detected at compile time. Either with errors immediately, or
warnings followed by failure to link. Motivated by an error in D115823.

Diff Detail

Event Timeline

JonChesterfield requested review of this revision.Dec 17 2021, 4:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2021, 4:00 PM
  • format header
  • disable clang-format around a formatting-sensitive comment
  • stray clang-format

This can be picked up and simplified using D121499

Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2022, 4:29 PM