Without these extern declarations, the final object file will not contain functions marked inline as LLVM discards them prior to code generation.
This has so far not been problematic as these methods usually get inlined. Downstream projects as well as consumers of the api/ headers may, however, be using different compiler flags or not have inline definitions available within the same translation unit. This would then cause an "undefined reference" linker error in any such project.
Without these
extern
declarations, the final object file will not contain functions markedinline
as LLVM discards them prior to code generation.This has so far not been problematic as these methods usually get inlined. Downstream projects as well as consumers of the
api/
headers may, however, be using different compiler flags or not have inline definitions available within the same translation unit. This would then cause an "undefined reference" linker error in any such project.