llvmcpy
llvmcpy copied to clipboard
Python bindings for LLVM auto-generated from the LLVM-C API
This is just a 1 line fix that handles integer consts that have the unsigned modifier. In LLVM 12, there are a few consts like 1U which the python script...
Setting a function attribute with `add_attribute_at_index()` and `AttributeFunctionIndex` fails with > OverflowError: can't convert negative number to unsigned This seems to be because the LLVM headers define LLVMAttributeFunctionIndex as -1,...
the C APIs for e.g. MDStrings and attribute kinds use explicit string lengths. For some functions this only makes the use inconvenient: * `llvm.get_enum_attribute_kind_for_name(name, len(name.encode('utf-8')))` * `llvm.get_md_kind_id(name, len(name.encode('utf-8')))` * `llvm.md_string(content,...
The set of functions `LLVMInitializeNative*` and `LLVMInitializeAll*` do not appear to exist in the bindings. A typical LLVM-C program might include the following lines to automatically configure for the current...
I have a variable of FunctionType and I want to iterate its parameter types, I find the `get_param_types()` method might be useful, however I failed to call it with the...