diff --git a/llvm/include/llvm-c/Orc.h b/llvm/include/llvm-c/Orc.h --- a/llvm/include/llvm-c/Orc.h +++ b/llvm/include/llvm-c/Orc.h @@ -652,7 +652,7 @@ * Returns the target triple for the given JITTargetMachineBuilder as a string. * * The caller owns the resulting string as must dispose of it by calling - * LLVMOrcJITTargetMachineBuilderDisposeTargetTriple. + * LLVMDisposeMessage */ char *LLVMOrcJITTargetMachineBuilderGetTargetTriple( LLVMOrcJITTargetMachineBuilderRef JTMB); @@ -664,13 +664,6 @@ void LLVMOrcJITTargetMachineBuilderSetTargetTriple( LLVMOrcJITTargetMachineBuilderRef JTMB, const char *TargetTriple); -/** - * Destroy a triple string returned by - * LLVMOrcJITTargetMachineBuilderGetTargetTriple. - */ -void LLVMOrcJITTargetMachineBuilderDisposeTargetTriple( - LLVMOrcJITTargetMachineBuilderRef JTMB, char *TargetTriple); - /** * Add an object to an ObjectLayer to the given JITDylib. * diff --git a/llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp b/llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp --- a/llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp +++ b/llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp @@ -486,11 +486,6 @@ unwrap(JTMB)->getTargetTriple() = Triple(TargetTriple); } -void LLVMOrcJITTargetMachineBuilderDisposeTargetTriple( - LLVMOrcJITTargetMachineBuilderRef JTMB, char *TargetTriple) { - free(TargetTriple); -} - LLVMErrorRef LLVMOrcObjectLayerAddObjectFile(LLVMOrcObjectLayerRef ObjLayer, LLVMOrcJITDylibRef JD, LLVMMemoryBufferRef ObjBuffer) { diff --git a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp --- a/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp @@ -63,7 +63,7 @@ // the case that it fails anyway. char *TT = LLVMOrcJITTargetMachineBuilderGetTargetTriple(JTMB); TargetTriple = TT; - LLVMOrcJITTargetMachineBuilderDisposeTargetTriple(JTMB, TT); + LLVMDisposeMessage(TT); if (!isSupported(TargetTriple)) { // If this triple isn't supported then bail out.