search for: add_global_variable

Displaying 5 results from an estimated 5 matches for "add_global_variable".

2008 May 12
2
[LLVMdev] Python bindings available.
...P::dtor deletes only the module and nothing else). > The routine LLVMModuleRef > LLVMGetGlobalParent(LLVMValueRef Global); poses a related problem; in this > case, the returned reference is non-owning, so you must not dtor it from > Python. If I do this: m1 = Module.new() g1 = m1.add_global_variable(ty, "name") m2 = g1.module will the LLVMModuleRef pointer returned in the last call be the same as that of m1? If so probably we can get "g1.module" to return the original object itself. > The fix, of course, is providing a dispose routine and requiring the user to > c...
2008 May 12
0
[LLVMdev] Python bindings available.
...> else). > >> The routine LLVMModuleRef LLVMGetGlobalParent(LLVMValueRef Global); >> poses a related problem; in this case, the returned reference is >> non-owning, so you must not dtor it from Python. > > If I do this: > > m1 = Module.new() > g1 = m1.add_global_variable(ty, "name") > m2 = g1.module > > will the LLVMModuleRef pointer returned in the last call be the > same as that of m1? If so probably we can get "g1.module" to > return the original object itself. It will, so that's a possibile. >> The fix, of course,...
2008 May 12
0
[LLVMdev] Python bindings available.
On May 10, 2008, at 05:44, Mahadevan R wrote: > I'd like to announce the availability of Python bindings for LLVM. > > It is built over llvm-c, and currently exposes enough APIs to build > an in-memory IR (and dump it!). It needs LLVM 2.3 latest and Python > 2.5 (2.4 should be sufficient, but I haven't tested). Tested only on > Linux/i386. > > Would love to
2008 May 12
2
[LLVMdev] Python bindings available.
...ne LLVMModuleRef LLVMGetGlobalParent(LLVMValueRef Global); > >> poses a related problem; in this case, the returned reference is > >> non-owning, so you must not dtor it from Python. > > > > If I do this: > > > > m1 = Module.new() > > g1 = m1.add_global_variable(ty, "name") > > m2 = g1.module > > > > will the LLVMModuleRef pointer returned in the last call be the > > same as that of m1? If so probably we can get "g1.module" to > > return the original object itself. > > It will, so that's a...
2008 May 10
4
[LLVMdev] Python bindings available.
Hi all, I'd like to announce the availability of Python bindings for LLVM. It is built over llvm-c, and currently exposes enough APIs to build an in-memory IR (and dump it!). It needs LLVM 2.3 latest and Python 2.5 (2.4 should be sufficient, but I haven't tested). Tested only on Linux/i386. Would love to hear your comments. [Needless to say, it's all work in progress, but mostly it