[llvm] [C-API] LLVMOrcCreateObjectLinkingLayerWithInProcessMemoryManager (PR #169862)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 30 17:20:29 PST 2025


lhames wrote:

> Does this all make sense? Thanks!

Yep -- that all makes sense.

> I suppose failure of underlying platform-specific things like sysconf(_SC_PAGESIZE) shouldn't really happen. An alternative error reporting style might be to follow LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess and return LLVMErrorRef with an output parameter for the LLVMOrcObjectLayerRef, but then it wouldn't be a drop-in replacement for LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager. Thoughts?

I think it's good to have a direct error reporting path where possible, so
```c
LLVMErrorRef LLVMOrcCreateObjectLinkingLayerWithInProcessMemoryManager(
    LLVMOrcInProcessMemoryManagerRef &MemMgr, LLVMOrcExecutionSessionRef ES);
```
would be preferred.

In the function body `mm` should be capitalised per LLVM conventions, but otherwise LGTM.

https://github.com/llvm/llvm-project/pull/169862


More information about the llvm-commits mailing list