[llvm] [LLVM][NewPM] Add C API for running the pipeline on a single function. (PR #103773)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 01:24:47 PDT 2024


================
@@ -48,15 +48,12 @@ static TargetMachine *unwrap(LLVMTargetMachineRef P) {
 DEFINE_SIMPLE_CONVERSION_FUNCTIONS(LLVMPassBuilderOptions,
                                    LLVMPassBuilderOptionsRef)
 
-LLVMErrorRef LLVMRunPasses(LLVMModuleRef M, const char *Passes,
-                           LLVMTargetMachineRef TM,
-                           LLVMPassBuilderOptionsRef Options) {
-  TargetMachine *Machine = unwrap(TM);
-  LLVMPassBuilderOptions *PassOpts = unwrap(Options);
+static LLVMErrorRef RunPasses(Module *Mod, Function *Fun, const char *Passes,
----------------
nikic wrote:

```suggestion
static LLVMErrorRef runPasses(Module *Mod, Function *Fun, const char *Passes,
```

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


More information about the llvm-commits mailing list