Issue 155881
Summary OrcV2CBindings examples and the new `LLVMOrcThreadSafeContext` API
Labels new issue
Assignees
Reporter MrAnno
    Hi,  

The `OrcV2CBindings` examples have recently changed, as the C function `LLVMOrcThreadSafeContextGetContext()` has been removed in favor of `LLVMOrcCreateNewThreadSafeContextFromLLVMContext()`.  

In the new examples:

- A new context and module are created here:
 https://github.com/llvm/llvm-project/blob/dff8788d4cc8e5e15bc1f95fabb27cf379ec25ac/llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/OrcV2CBindingsBasicUsage.c#L26
https://github.com/llvm/llvm-project/blob/dff8788d4cc8e5e15bc1f95fabb27cf379ec25ac/llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/OrcV2CBindingsBasicUsage.c#L29

- A thread-safe module is constructed using the previously mentioned module, but the thread-safe context appears to hold a different context than the module:
 https://github.com/llvm/llvm-project/blob/dff8788d4cc8e5e15bc1f95fabb27cf379ec25ac/llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/OrcV2CBindingsBasicUsage.c#L57-L62

Could this be an issue?  

>From my understanding, `LLVMOrcCreateNewThreadSafeContextFromLLVMContext()` should have been used to wrap the original context instead of creating a new one with `LLVMOrcCreateNewThreadSafeContext()`.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to