[llvm] [LLVM-C] Upstream `LLVMGetOrInsertFunction` from rustc (PR #162235)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 7 07:14:56 PDT 2025


================
@@ -146,6 +146,8 @@ Changes to the Python bindings
 Changes to the C API
 --------------------
 
+* Add `LLVMGetOrInsertFunction` the more idiomatic way to insert declarations
----------------
nikic wrote:

```suggestion
* Add `LLVMGetOrInsertFunction` as a more idiomatic way to insert declarations.
```
or maybe
```suggestion
* Add `LLVMGetOrInsertFunction` to get or insert a function, replacing the combination of `LLVMGetNamedFunction` and `LLVMAddFunction`.
```

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


More information about the llvm-commits mailing list