[llvm.py] Initial skeleton for Python LLVM bindings

This contains a semi-functional skeleton for the implementation of the
LLVM bindings for Python.

The API for the Object.h interface is roughly designed but not
implemented. MemoryBufferRef is implemented and actually appears to
work!

The ObjectFile unit test fails with a segmentation fault because the
LLVM library isn't being properly initialized. The build system doesn't
know about this code yet, so no alerts should fire.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152397 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gregory Szorc
2012-03-09 09:07:35 +00:00
parent 1fabd9f85e
commit 5ae04279e0
7 changed files with 361 additions and 0 deletions

View File

@ -0,0 +1,9 @@
from llvm.common import find_library
from llvm.object import ObjectFile
import unittest
class TestObjectFile(unittest.TestCase):
def test_create_from_file(self):
source = find_library()
of = ObjectFile(filename=source)