RFR: 7903758: jextract should avoid temporary file creation [v4]
Athijegannathan Sundararajan
sundar at openjdk.org
Tue Jun 25 14:25:56 UTC 2024
On Tue, 25 Jun 2024 14:02:47 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:
>> jextract creates a temporary file to support multiple headers and special header syntax <foo.h>. This patch avoids that temporary file creation by using clang's in-memory parsing API clang_createTranslationUnitFromSourceFile
>
> Athijegannathan Sundararajan has updated the pull request incrementally with one additional commit since the last revision:
>
> Using clang_parseTranslationUnit2 instead of clang_createTranslationUnitFromSourceFile.
Evolution of this PR:
* We thought we eeded a new clang function clang_createTranslationUnitFromSourceFile
* Regenerated the clang bindings with the extra function
* When doing that realized the generated bindings contained an issue in javadoc comments (extra whitespace and extra "}")
* Then, realised that we can make use of existing clang binding clang_parseTranslationUnit2 (code review comment by @JornVernee )
* Dropped the new clang function clang_createTranslationUnitFromSourceFile in binding
* But we're keeping regenerated clang bindings along with the codegen fix (as these are nice to have) - even though this is not strictly related to the current PR.
-------------
PR Comment: https://git.openjdk.org/jextract/pull/251#issuecomment-2189103005
More information about the jextract-dev
mailing list