Skip to content

Conversation

@sklam
Copy link
Member

@sklam sklam commented May 13, 2024

Adds llvmlite.binding.TypeRef.as_ir() to extract llvmlite.ir.Type. This is useful for building wrappers around functions emitted by other LLVM-IR producing tools. See new tests that uses output from clang on C++ sources.

@sklam
Copy link
Member Author

sklam commented May 15, 2024

@sklam sklam marked this pull request as ready for review May 15, 2024 21:32
Copy link
Contributor

@stuartarchibald stuartarchibald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for exposing this interface @sklam, it is just what is needed for numba/pixie#21. A single typo else looks good. Thanks again!

self.assertEqual(got, ty)
self.assertIsInstance(got, irtype)

def _check_typeref_as_ir_for_wrappers(self, asm, target_symbol):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

Copy link
Contributor

@stuartarchibald stuartarchibald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch and fixes!

@sklam sklam merged commit 9145174 into numba:main Jun 10, 2024
@sklam sklam deleted the enh/type_roundtrip branch June 10, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants