|
18 | 18 | from llvmlite.binding import ffi |
19 | 19 | from llvmlite.tests import TestCase |
20 | 20 |
|
21 | | -# FIXME: Remove me once typed pointers are no longer supported. |
22 | | -from llvmlite import opaque_pointers_enabled |
23 | | - |
24 | 21 | # arvm7l needs extra ABI symbols to link successfully |
25 | 22 | if platform.machine() == 'armv7l': |
26 | 23 | llvm.load_library_permanently('libgcc_s.so.1') |
@@ -1655,12 +1652,7 @@ def test_type_printing_struct(self): |
1655 | 1652 | mod = self.module() |
1656 | 1653 | st = mod.get_global_variable("glob_struct") |
1657 | 1654 | self.assertTrue(st.type.is_pointer) |
1658 | | - # FIXME: Remove `else' once TP are no longer supported. |
1659 | | - if opaque_pointers_enabled: |
1660 | | - self.assertIsNotNone(re.match(r'ptr', str(st.type))) |
1661 | | - else: |
1662 | | - self.assertIsNotNone(re.match(r'%struct\.glob_type(\.[\d]+)?\*', |
1663 | | - str(st.type))) |
| 1655 | + self.assertIsNotNone(re.match(r'ptr', str(st.type))) |
1664 | 1656 | self.assertIsNotNone(re.match( |
1665 | 1657 | r"%struct\.glob_type(\.[\d]+)? = type { i64, \[2 x i64\] }", |
1666 | 1658 | str(st.global_value_type))) |
@@ -1849,11 +1841,7 @@ def test_constant_as_string(self): |
1849 | 1841 | inst = list(list(func.blocks)[0].instructions)[0] |
1850 | 1842 | arg = list(inst.operands)[0] |
1851 | 1843 | self.assertTrue(arg.is_constant) |
1852 | | - # FIXME: Remove `else' once TP are no longer supported. |
1853 | | - if opaque_pointers_enabled: |
1854 | | - self.assertEqual(arg.get_constant_value(), 'ptr null') |
1855 | | - else: |
1856 | | - self.assertEqual(arg.get_constant_value(), 'i64* null') |
| 1844 | + self.assertEqual(arg.get_constant_value(), 'ptr null') |
1857 | 1845 |
|
1858 | 1846 | def test_incoming_phi_blocks(self): |
1859 | 1847 | mod = self.module(asm_phi_blocks) |
@@ -1958,12 +1946,7 @@ def test_vararg_function(self): |
1958 | 1946 | self.assertTrue(func.type.is_pointer) |
1959 | 1947 | with self.assertRaises(ValueError) as raises: |
1960 | 1948 | func.type.is_function_vararg |
1961 | | - # FIXME: Remove `else' once TP are no longer supported. |
1962 | | - if opaque_pointers_enabled: |
1963 | | - self.assertIn("Type ptr is not a function", str(raises.exception)) |
1964 | | - else: |
1965 | | - self.assertIn("Type i32 (i32, i32)* is not a function", |
1966 | | - str(raises.exception)) |
| 1949 | + self.assertIn("Type ptr is not a function", str(raises.exception)) |
1967 | 1950 |
|
1968 | 1951 | def test_function_typeref_as_ir(self): |
1969 | 1952 | mod = self.module() |
|
0 commit comments