|
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') |
@@ -1647,12 +1644,7 @@ def test_type_printing_struct(self): |
1647 | 1644 | mod = self.module() |
1648 | 1645 | st = mod.get_global_variable("glob_struct") |
1649 | 1646 | self.assertTrue(st.type.is_pointer) |
1650 | | - # FIXME: Remove `else' once TP are no longer supported. |
1651 | | - if opaque_pointers_enabled: |
1652 | | - self.assertIsNotNone(re.match(r'ptr', str(st.type))) |
1653 | | - else: |
1654 | | - self.assertIsNotNone(re.match(r'%struct\.glob_type(\.[\d]+)?\*', |
1655 | | - str(st.type))) |
| 1647 | + self.assertIsNotNone(re.match(r'ptr', str(st.type))) |
1656 | 1648 | self.assertIsNotNone(re.match( |
1657 | 1649 | r"%struct\.glob_type(\.[\d]+)? = type { i64, \[2 x i64\] }", |
1658 | 1650 | str(st.global_value_type))) |
@@ -1841,11 +1833,7 @@ def test_constant_as_string(self): |
1841 | 1833 | inst = list(list(func.blocks)[0].instructions)[0] |
1842 | 1834 | arg = list(inst.operands)[0] |
1843 | 1835 | self.assertTrue(arg.is_constant) |
1844 | | - # FIXME: Remove `else' once TP are no longer supported. |
1845 | | - if opaque_pointers_enabled: |
1846 | | - self.assertEqual(arg.get_constant_value(), 'ptr null') |
1847 | | - else: |
1848 | | - self.assertEqual(arg.get_constant_value(), 'i64* null') |
| 1836 | + self.assertEqual(arg.get_constant_value(), 'ptr null') |
1849 | 1837 |
|
1850 | 1838 | def test_incoming_phi_blocks(self): |
1851 | 1839 | mod = self.module(asm_phi_blocks) |
@@ -1950,12 +1938,7 @@ def test_vararg_function(self): |
1950 | 1938 | self.assertTrue(func.type.is_pointer) |
1951 | 1939 | with self.assertRaises(ValueError) as raises: |
1952 | 1940 | func.type.is_function_vararg |
1953 | | - # FIXME: Remove `else' once TP are no longer supported. |
1954 | | - if opaque_pointers_enabled: |
1955 | | - self.assertIn("Type ptr is not a function", str(raises.exception)) |
1956 | | - else: |
1957 | | - self.assertIn("Type i32 (i32, i32)* is not a function", |
1958 | | - str(raises.exception)) |
| 1941 | + self.assertIn("Type ptr is not a function", str(raises.exception)) |
1959 | 1942 |
|
1960 | 1943 | def test_function_typeref_as_ir(self): |
1961 | 1944 | mod = self.module() |
|
0 commit comments