RFR: 7903758: jextract should avoid temporary file creation [v4]

Jorn Vernee jvernee at openjdk.org
Tue Jun 25 14:13:34 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.

src/main/java/org/openjdk/jextract/impl/Parser.java line 111:

> 109:     }
> 110: 
> 111:     public Declaration.Scoped parse(String name, String content, Collection<String> args) {

The only use of this method seems to be in `JextractTool`, so I think the old version can just be removed?

-------------

PR Review Comment: https://git.openjdk.org/jextract/pull/251#discussion_r1652899192


More information about the jextract-dev mailing list