diff options
author | Michael Gottesman <mgottesman@apple.com> | 2013-09-11 00:41:05 +0000 |
---|---|---|
committer | Michael Gottesman <mgottesman@apple.com> | 2013-09-11 00:41:05 +0000 |
commit | a1e366058b2ffce54b3f92a1a74094822c819c80 (patch) | |
tree | 8f858012234ae44f8d7d166bc734a433f15f53ea /bindings/python/llvm | |
parent | 3b389cb74e13a5631c9650115aafd2af4580ce83 (diff) | |
download | external_llvm-a1e366058b2ffce54b3f92a1a74094822c819c80.zip external_llvm-a1e366058b2ffce54b3f92a1a74094822c819c80.tar.gz external_llvm-a1e366058b2ffce54b3f92a1a74094822c819c80.tar.bz2 |
[python-bindings] Added test for reading a module from bitcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190467 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/python/llvm')
-rw-r--r-- | bindings/python/llvm/tests/test_bitreader.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bindings/python/llvm/tests/test_bitreader.py b/bindings/python/llvm/tests/test_bitreader.py new file mode 100644 index 0000000..d585009 --- /dev/null +++ b/bindings/python/llvm/tests/test_bitreader.py @@ -0,0 +1,15 @@ +from .base import TestBase +from ..core import OpCode +from ..core import MemoryBuffer +from ..core import PassRegistry +from ..core import Context +from ..core import Module +from ..bit_reader import parse_bitcode + +class TestBitReader(TestBase): + + def test_parse_bitcode(self): + source = self.get_test_bc() + m = parse_bitcode(MemoryBuffer(filename=source)) + print m.target + print m.datalayout |