Skip to content

Commit

Permalink
[ORC][C-bindings] Fix some ORC C bindings function names and signatures.
Browse files Browse the repository at this point in the history
LLVMOrcDisposeObjectLayer and LLVMOrcExecutionSessionGetJITDylibByName did not
have matching signatures between the C-API header and binding implementations.
Fixes http://llvm.org/PR49745.

Patch by Mats Larsen. Thanks Mats!

Reviewed by: lhames

Differential Revision: https://reviews.llvm.org/D99478

(cherry picked from commit 666df2e)
  • Loading branch information
lhames authored and tstellar committed Apr 2, 2021
1 parent 31001be commit 04ba60c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions llvm/include/llvm-c/Orc.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ LLVMErrorRef LLVMOrcResourceTrackerRemove(LLVMOrcResourceTrackerRef RT);
* ownership has not been passed to a JITDylib (e.g. because some error
* prevented the client from calling LLVMOrcJITDylibAddGenerator).
*/
void LLVMOrcDisposeDefinitionGenerator(
LLVMOrcDefinitionGeneratorRef DG);
void LLVMOrcDisposeDefinitionGenerator(LLVMOrcDefinitionGeneratorRef DG);

/**
* Dispose of a MaterializationUnit.
Expand Down Expand Up @@ -388,7 +387,9 @@ LLVMOrcExecutionSessionCreateJITDylib(LLVMOrcExecutionSessionRef ES,
* Returns the JITDylib with the given name, or NULL if no such JITDylib
* exists.
*/
LLVMOrcJITDylibRef LLVMOrcExecutionSessionGetJITDylibByName(const char *Name);
LLVMOrcJITDylibRef
LLVMOrcExecutionSessionGetJITDylibByName(LLVMOrcExecutionSessionRef ES,
const char *Name);

/**
* Return a reference to a newly created resource tracker associated with JD.
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ void LLVMOrcDisposeJITTargetMachineBuilder(
delete unwrap(JTMB);
}

void lLVMOrcDisposeObjectLayer(LLVMOrcObjectLayerRef ObjLayer) {
void LLVMOrcDisposeObjectLayer(LLVMOrcObjectLayerRef ObjLayer) {
delete unwrap(ObjLayer);
}

Expand Down

0 comments on commit 04ba60c

Please sign in to comment.