Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a proper managed wrapper for LLVMSharp #137

Merged
merged 3 commits into from
Apr 18, 2020

Conversation

tannergooding
Copy link
Member

This adds a proper managed wrapper that loosely mirrors the LLVM object-oriented API surface available in C++.

@tannergooding
Copy link
Member Author

CC. @mjsabby as an FYI

@tannergooding
Copy link
Member Author

Still quite a bit more to expose before it is useable by itself (without falling back to invoking methods off Handle), but this shows the general design and exposes a good set of APIs.

Copy link
Contributor

@mjsabby mjsabby left a comment

Choose a reason for hiding this comment

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

There were some places I thought you'd make them structs, like Value or Class, but this is after all supposed to feel like a more managed API so it seems alright.

@tannergooding
Copy link
Member Author

There were some places I thought you'd make them structs, like Value or Class, but this is after all supposed to feel like a more managed API so it seems alright.

I've tried to mirror how LLVM handles them. Most of these are handles in the C and are exclusively passed around in the C++ API as T*. They often also have a inheritance hierarchy which means that class is necessary and appropriate.

@tannergooding tannergooding changed the title [WIP] Add a proper managed wrapper for LLVMSharp Add a proper managed wrapper for LLVMSharp Apr 18, 2020
@tannergooding
Copy link
Member Author

Going to merge this and work on continuing with the rest of the surface area.

@tannergooding tannergooding merged commit 4298bd7 into dotnet:master Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants