Add typed-handle wrappers for the ORC v2 / LLJIT C-API#269
Merged
tannergooding merged 4 commits intoJul 16, 2026
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…types Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ypes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds typed-handle wrappers for the ORC v2 / LLJIT C-API — all 92
LLVMOrc*functions across 20 new structs, so the ORC JIT surface is usable from the middle layer instead of the raw generatedLLVM.*P/Invokes.The
LLVMOrc*Reftypedefs previously had no Layer-2 struct (generated code used the rawLLVMOrcOpaque*pointers), so each new struct gets the standard implicit conversions to/from the opaque pointer plus the equality/GetHashCode/ToString boilerplate.New structs: LLJIT, LLJITBuilder, ThreadSafeContext, ThreadSafeModule, JITTargetMachineBuilder, ExecutionSession, JITDylib, ResourceTracker, SymbolStringPool(+Entry), ObjectLayer, IRTransformLayer, ObjectTransformLayer, IndirectStubsManager, LazyCallThroughManager, DumpObjects, DefinitionGenerator, LookupState, MaterializationUnit, MaterializationResponsibility.
Conventions: errors surfaced as
LLVMErrorRef; Dispose* → IDisposable (the LLJIT dispose discards its error return via_ =); retain/release exposed as explicit methods rather than auto-refcounting; function-pointer params (error reporter, transforms, custom generator/MU, memory-manager callbacks) exposed asdelegate* unmanaged[Cdecl]<...>matching the extern signatures; ownership-transfer / caller-owned / pooled-no-dispose semantics documented inline where subtle.LLVMOrcThreadSafeContextGetContextis not present in this LLVM-C surface, so ThreadSafeContext intentionally has no get-context member.Interop-only; no generated-file edits. Builds clean (0 warnings), 2625 tests pass.