NVIDIA / numbast

Numbast is a tool to build an automated pipeline that converts CUDA APIs into Numba bindings.
Apache License 2.0
14 stars 4 forks source link

Fix Bug: Numbast do not create proper llvm structure type when lowering struct with private / protected fields #38

Closed isVoid closed 2 months ago

isVoid commented 2 months ago

This PR fixes a bug in Numbast. AST_canopy currently do not parse private fields of structs, originally this was meant for not creating bindings for non-public attribute / methods of C++ structs. However, Numbast still needs these information to create the proper LLVM types during lowering, so that when moving the object around, proper IR with type is emit. This PR adds back those information, but attaching access specifier information to each field. Numbast create bindings based on access specifier information, and uses all field information to lower it to proper LLVM type.

- Parse all fields, and add access specifier information