RFR: 7903758: jextract should avoid temporary file creation [v3]
Jorn Vernee
jvernee at openjdk.org
Tue Jun 25 12:32:22 UTC 2024
On Tue, 25 Jun 2024 12:18:33 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:
>
> whitespace issue in codegenerator. Regenerated clang binding
src/main/java/org/openjdk/jextract/clang/Index.java line 130:
> 128: return rv;
> 129: }
> 130: }
Can't we use `clang_parseTranslationUnit2`? It also supports unsaved files, but also supports returning error codes. I suppose `clang_createTranslationUnitFromSourceFile` returns `NULL` if parsing fails.
-------------
PR Review Comment: https://git.openjdk.org/jextract/pull/251#discussion_r1652720144
More information about the jextract-dev
mailing list