llvmpy/llvmpy — pull request #20 by laanwj (2012-09-12 18:06:34+00:00)
Title: Add support for module named metadata

This is mainly useful to get access to top-level debug information through `llvm.dbg.cu`.

Wraps LLVM C-API functions `LLVMGetNamedMetadataNumOperands`, `LLVMGetNamedMetadataOperands` and `LLVMAddNamedMetadataOperand`.

Also add testcase.

I was divided between adding the functions as normal methods on `Module` or as static methods on `MetaData`. I went with the second to keep it in line with `MetaData.get`.