Page MenuHomePhabricator

[libclang] Expose AtomicType
Needs ReviewPublic

Authored by slowhog on May 8 2019, 10:12 PM.

Details

Reviewers
aaron.ballman
Summary

Expose atomic type through the C API.

Diff Detail

Event Timeline

slowhog created this revision.May 8 2019, 10:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 8 2019, 10:12 PM
slowhog retitled this revision from Expose AtomicType to [libclang] Expose AtomicType.May 8 2019, 10:17 PM
slowhog edited projects, added Restricted Project; removed Restricted Project.May 23 2019, 11:10 AM
slowhog removed reviewers: yvvan, jbcoe.

Hi,

We use libclang in OpenJDK project Panama for a tool, jextract, to read C header files and generate Java bindings. It's critical for us to be able get the "real" underlying type.

Currently type like _Atomic(int) are not exposed, and libclang will give us a type kind of CXType_Unexposed, and we need a way to get the value type of CXType_Int .

Is there an existing way to do that? I have tried to call clang_getCanonicalType on the unexposed type, but that return the same unexposed type.

Please let me know if the proposed patch is on the right track or not, I would appreciate guidance to get this issue solved.

Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2019, 11:10 AM
slowhog updated this revision to Diff 241747.Jan 31 2020, 9:05 AM
slowhog added a reviewer: aaron.ballman.

Updated to latest