Skip to content

Commit 04ba60c

Browse files
lhameststellar
authored andcommitted
[ORC][C-bindings] Fix some ORC C bindings function names and signatures.
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)
1 parent 31001be commit 04ba60c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Diff for: llvm/include/llvm-c/Orc.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@ LLVMErrorRef LLVMOrcResourceTrackerRemove(LLVMOrcResourceTrackerRef RT);
339339
* ownership has not been passed to a JITDylib (e.g. because some error
340340
* prevented the client from calling LLVMOrcJITDylibAddGenerator).
341341
*/
342-
void LLVMOrcDisposeDefinitionGenerator(
343-
LLVMOrcDefinitionGeneratorRef DG);
342+
void LLVMOrcDisposeDefinitionGenerator(LLVMOrcDefinitionGeneratorRef DG);
344343

345344
/**
346345
* Dispose of a MaterializationUnit.
@@ -388,7 +387,9 @@ LLVMOrcExecutionSessionCreateJITDylib(LLVMOrcExecutionSessionRef ES,
388387
* Returns the JITDylib with the given name, or NULL if no such JITDylib
389388
* exists.
390389
*/
391-
LLVMOrcJITDylibRef LLVMOrcExecutionSessionGetJITDylibByName(const char *Name);
390+
LLVMOrcJITDylibRef
391+
LLVMOrcExecutionSessionGetJITDylibByName(LLVMOrcExecutionSessionRef ES,
392+
const char *Name);
392393

393394
/**
394395
* Return a reference to a newly created resource tracker associated with JD.

Diff for: llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ void LLVMOrcDisposeJITTargetMachineBuilder(
393393
delete unwrap(JTMB);
394394
}
395395

396-
void lLVMOrcDisposeObjectLayer(LLVMOrcObjectLayerRef ObjLayer) {
396+
void LLVMOrcDisposeObjectLayer(LLVMOrcObjectLayerRef ObjLayer) {
397397
delete unwrap(ObjLayer);
398398
}
399399

0 commit comments

Comments
 (0)