Regenerating the LLVMSharp sources based on 8.0.0 release#96
Regenerating the LLVMSharp sources based on 8.0.0 release#96tannergooding merged 2 commits intodotnet:masterfrom
Conversation
| public void AddTypeBasedAliasAnalysisPass() => LLVM.AddTypeBasedAliasAnalysisPass(this.Unwrap()); | ||
| public void AddScopedNoAliasAAPass() => LLVM.AddScopedNoAliasAAPass(this.Unwrap()); | ||
| public void AddBasicAliasAnalysisPass() => LLVM.AddBasicAliasAnalysisPass(this.Unwrap()); | ||
| public void AddBBVectorizePass() => LLVM.AddBBVectorizePass(this.Unwrap()); |
There was a problem hiding this comment.
This API was removed with https://reviews.llvm.org/D47436
| public static extern void SetMetadata2(LLVMValueRef @Inst, uint @KindID, LLVMMetadataRef @MD); | ||
|
|
||
| [DllImport(libraryPath, EntryPoint = "LLVMMetadataReplaceAllUsesWith", CallingConvention = CallingConvention.Cdecl)] | ||
| public static extern void MetadataReplaceAllUsesWith(LLVMMetadataRef @MD, LLVMMetadataRef @New); |
There was a problem hiding this comment.
These are auto generated with the correct signature by default.
| public static extern void InitializeCore(LLVMPassRegistryRef R); | ||
|
|
||
| [DllImport(libraryPath, EntryPoint = "LLVMAddInstructionCombiningPass", CallingConvention = CallingConvention.Cdecl)] | ||
| public static extern void AddInstructionCombiningPass(LLVMPassManagerRef PM); |
There was a problem hiding this comment.
This, like LLVMInitializeCore, is defined in two header files.
|
|
||
| csc /out:ClangSharpPInvokeGenerator.exe ClangSharpPInvokeGenerator\*.cs | ||
| ClangSharpPInvokeGenerator.exe --m LLVM --p LLVM --namespace LLVMSharp --output Generated.tmp.cs --libraryPath %1 --include %2 --file %2/llvm-c/Analysis.h --file %2/llvm-c/BitReader.h --file %2/llvm-c/BitWriter.h --file %2/llvm-c/Core.h --file %2/llvm-c/Disassembler.h --file %2/llvm-c/ErrorHandling.h --file %2/llvm-c/ExecutionEngine.h --file %2/llvm-c/Initialization.h --file %2/llvm-c/IRReader.h --file %2/llvm-c/Linker.h --file %2/llvm-c/LinkTimeOptimizer.h --file %2/llvm-c/lto.h --file %2/llvm-c/Object.h --file %2/llvm-c/OrcBindings.h --file %2/llvm-c/Support.h --file %2/llvm-c/Target.h --file %2/llvm-c/TargetMachine.h --file %2/llvm-c/Types.h --file %2/llvm-c/Transforms/IPO.h --file %2/llvm-c/Transforms/PassManagerBuilder.h --file %2/llvm-c/Transforms/Scalar.h --file %2/llvm-c/Transforms/Vectorize.h --e LLVMDisasmInstruction --e LLVMGetBufferStart --e LLVMGetDiagInfoDescription --e "LLVMGetDefaultTargetTriple --e LLVMCopyStringRepOfTargetData --e LLVMGetTargetMachineTriple --e LLVMGetTargetMachineCPU --e LLVMGetTargetMachineFeatureString --e LLVMPrintTypeToString --e LLVMCreateMessage --e LLVMDisposeMessage --e LLVMPrintModuleToString --e LLVMPrintValueToString --e LLVMOrcDisposeMangledSymbol --e LLVMTargetMachineEmitToFile --e LLVMInitializeCore | ||
| ClangSharpPInvokeGenerator.exe --m LLVM --p LLVM --namespace LLVMSharp --output Generated.tmp.cs --libraryPath %1 --include %2 --file %2/llvm-c/Analysis.h --file %2/llvm-c/BitReader.h --file %2/llvm-c/BitWriter.h --file %2/llvm-c/Comdat.h --file %2/llvm-c/Core.h --file %2/llvm-c/DataTypes.h --file %2/llvm-c/DebugInfo.h --file %2/llvm-c/Disassembler.h --file %2/llvm-c/DisassemblerTypes.h --file %2/llvm-c/Error.h --file %2/llvm-c/ErrorHandling.h --file %2/llvm-c/ExecutionEngine.h --file %2/llvm-c/Initialization.h --file %2/llvm-c/IRReader.h --file %2/llvm-c/Linker.h --file %2/llvm-c/LinkTimeOptimizer.h --file %2/llvm-c/lto.h --file %2/llvm-c/Object.h --file %2/llvm-c/OptRemarks.h --file %2/llvm-c/OrcBindings.h --file %2/llvm-c/Support.h --file %2/llvm-c/Target.h --file %2/llvm-c/TargetMachine.h --file %2/llvm-c/Types.h --file %2/llvm-c/Transforms/AggressiveInstCombine.h --file %2/llvm-c/Transforms/Coroutines.h --file %2/llvm-c/Transforms/InstCombine.h --file %2/llvm-c/Transforms/IPO.h --file %2/llvm-c/Transforms/PassManagerBuilder.h --file %2/llvm-c/Transforms/Scalar.h --file %2/llvm-c/Transforms/Utils.h --file %2/llvm-c/Transforms/Vectorize.h --e LLVMDisasmInstruction --e LLVMGetBufferStart --e LLVMGetDiagInfoDescription --e LLVMGetDefaultTargetTriple --e LLVMCopyStringRepOfTargetData --e LLVMGetTargetMachineTriple --e LLVMGetTargetMachineCPU --e LLVMGetTargetMachineFeatureString --e LLVMPrintTypeToString --e LLVMCreateMessage --e LLVMDisposeMessage --e LLVMPrintModuleToString --e LLVMPrintValueToString --e LLVMOrcDisposeMangledSymbol --e LLVMTargetMachineEmitToFile --e LLVMInitializeCore --e LLVMAddInstructionCombiningPass |
There was a problem hiding this comment.
Now that this can be generated directly from ClangSharp, we should figure out what to do with the checked in copy of the P/Invoke binding generator...
There was a problem hiding this comment.
Also worth noting that it might be worth supporting some kind of rsp file for argument inputs so projects don't hit the upper limit of command line input lengths...
There was a problem hiding this comment.
I like the idea of an rsp.
As per the title, this regenerates LLVMSharp based on the 8.0.0 release. However, It does not do any of the work to expose a managed wrapper for the new APIs.
This was generated based off the Ubuntu 18.04 pre-built tarball and added includes several new header files.