From 611812a4dd3c4c0f812eccaca7cec7c974a4598d Mon Sep 17 00:00:00 2001 From: "Todd A. Anderson" Date: Wed, 24 May 2023 14:25:48 -0700 Subject: [PATCH 01/11] Add operand bundle tag support and file system support. --- ffi/CMakeLists.txt | 2 +- ffi/Makefile.linux | 2 +- ffi/file_system.cpp | 29 +++++++++++++++++++++++++++++ llvmlite/binding/__init__.py | 1 + llvmlite/binding/file_system.py | 17 +++++++++++++++++ llvmlite/ir/builder.py | 21 +++++++++++++-------- llvmlite/ir/instructions.py | 12 ++++++++---- llvmlite/ir/module.py | 7 +++++-- llvmlite/ir/types.py | 20 ++++++++++++++++++++ 9 files changed, 95 insertions(+), 16 deletions(-) create mode 100644 ffi/file_system.cpp create mode 100644 llvmlite/binding/file_system.py diff --git a/ffi/CMakeLists.txt b/ffi/CMakeLists.txt index e4ce2c12c..11919549e 100755 --- a/ffi/CMakeLists.txt +++ b/ffi/CMakeLists.txt @@ -40,7 +40,7 @@ endif() add_library(llvmlite SHARED assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp linker.cpp object_file.cpp - custom_passes.cpp orcjit.cpp) + custom_passes.cpp orcjit.cpp file_system.cpp) # Find the libraries that correspond to the LLVM components # that we wish to use. diff --git a/ffi/Makefile.linux b/ffi/Makefile.linux index c1df42dbb..2bd13856c 100644 --- a/ffi/Makefile.linux +++ b/ffi/Makefile.linux @@ -13,7 +13,7 @@ LIBS = $(LLVM_LIBS) INCLUDE = core.h OBJ = assembly.o bitcode.o core.o initfini.o module.o value.o \ executionengine.o transforms.o passmanagers.o targets.o dylib.o \ - linker.o object_file.o custom_passes.o orcjit.o + linker.o object_file.o custom_passes.o orcjit.o file_system.o OUTPUT = libllvmlite.so all: $(OUTPUT) diff --git a/ffi/file_system.cpp b/ffi/file_system.cpp new file mode 100644 index 000000000..64942b87f --- /dev/null +++ b/ffi/file_system.cpp @@ -0,0 +1,29 @@ +#include "core.h" + +#include "llvm-c/ExecutionEngine.h" +#include "llvm-c/Object.h" + +#include "llvm/Object/ObjectFile.h" +#include "llvm/Support/FileSystem.h" + +#include + +extern "C" { + +API_EXPORT(uint64_t) +LLVMPY_GetDeviceForFile(const char *path) +{ + llvm::sys::fs::UniqueID ID; + llvm::sys::fs::getUniqueID(path, ID); + return ID.getDevice(); +} + +API_EXPORT(uint64_t) +LLVMPY_GetFileIdForFile(const char *path) +{ + llvm::sys::fs::UniqueID ID; + llvm::sys::fs::getUniqueID(path, ID); + return ID.getFile(); +} + +} // end extern C diff --git a/llvmlite/binding/__init__.py b/llvmlite/binding/__init__.py index 3ef0301a9..3f04ee9aa 100644 --- a/llvmlite/binding/__init__.py +++ b/llvmlite/binding/__init__.py @@ -15,3 +15,4 @@ from .object_file import * from .context import * from .orcjit import * +from .file_system import * diff --git a/llvmlite/binding/file_system.py b/llvmlite/binding/file_system.py new file mode 100644 index 000000000..5280269fb --- /dev/null +++ b/llvmlite/binding/file_system.py @@ -0,0 +1,17 @@ +from . import ffi +from ctypes import c_char_p, c_uint64 +from .common import _encode_string + +def getDeviceForFile(path): + cp = _encode_string(path) + return ffi.lib.LLVMPY_GetDeviceForFile(cp) + +def getFileIdForFile(path): + cp = _encode_string(path) + return ffi.lib.LLVMPY_GetFileIdForFile(cp) + +ffi.lib.LLVMPY_GetDeviceForFile.argtypes = [c_char_p] +ffi.lib.LLVMPY_GetDeviceForFile.restype = c_uint64 + +ffi.lib.LLVMPY_GetFileIdForFile.argtypes = [c_char_p] +ffi.lib.LLVMPY_GetFileIdForFile.restype = c_uint64 diff --git a/llvmlite/ir/builder.py b/llvmlite/ir/builder.py index a9c126823..f2eb9c86f 100644 --- a/llvmlite/ir/builder.py +++ b/llvmlite/ir/builder.py @@ -771,12 +771,17 @@ def store(self, value, ptr, align=None): Store value to pointer, with optional guaranteed alignment: *ptr = name """ - if not isinstance(ptr.type, types.PointerType): - msg = "cannot store to value of type %s (%r): not a pointer" - raise TypeError(msg % (ptr.type, str(ptr))) - if ptr.type.pointee != value.type: - raise TypeError("cannot store %s to %s: mismatching types" - % (value.type, ptr.type)) + if isinstance(ptr.type, types.TokenType): + if ptr.type != value.type: + raise TypeError("cannot store %s to %s: mismatching types" + % (value.type, ptr.type)) + else: + if not isinstance(ptr.type, types.PointerType): + raise TypeError("cannot store to value of type %s (%r): not a pointer" + % (ptr.type, str(ptr))) + if ptr.type.pointee != value.type: + raise TypeError("cannot store %s to %s: mismatching types" + % (value.type, ptr.type)) st = instructions.StoreInstr(self.block, value, ptr) st.align = align self._insert(st) @@ -873,14 +878,14 @@ def resume(self, landingpad): # Call APIs def call(self, fn, args, name='', cconv=None, tail=False, fastmath=(), - attrs=(), arg_attrs=None): + attrs=(), arg_attrs=None, tags=None): """ Call function *fn* with *args*: name = fn(args...) """ inst = instructions.CallInstr(self.block, fn, args, name=name, cconv=cconv, tail=tail, fastmath=fastmath, - attrs=attrs, arg_attrs=arg_attrs) + attrs=attrs, arg_attrs=arg_attrs, tags=tags) self._insert(inst) return inst diff --git a/llvmlite/ir/instructions.py b/llvmlite/ir/instructions.py index 35e63f77f..0b18691cc 100644 --- a/llvmlite/ir/instructions.py +++ b/llvmlite/ir/instructions.py @@ -66,7 +66,7 @@ class FastMathFlags(AttributeSet): class CallInstr(Instruction): def __init__(self, parent, func, args, name='', cconv=None, tail=None, - fastmath=(), attrs=(), arg_attrs=None): + fastmath=(), attrs=(), arg_attrs=None, tags=None): self.cconv = (func.calling_convention if cconv is None and isinstance(func, Function) else cconv) @@ -83,6 +83,7 @@ def __init__(self, parent, func, args, name='', cconv=None, tail=None, self.tail = tail self.fastmath = FastMathFlags(fastmath) self.attributes = CallInstrAttributes(attrs) + self.tags = tags self.arg_attributes = {} if arg_attrs: for idx, attrs in arg_attrs.items(): @@ -155,15 +156,16 @@ def descr_arg(i, a): if self.tail: tail_marker = "{0} ".format(self.tail) - buf.append("{tail}{op}{fastmath} {callee}({args}){attr}{meta}\n".format( + buf.append("{tail}{op}{fastmath} {callee}({args}){attr}{tags}{meta}\n".format( tail=tail_marker, op=self.opname, - callee=callee_ref, fastmath=''.join([" " + attr for attr in self.fastmath]), + callee=callee_ref, args=args, attr=''.join([" " + attr for attr in self.attributes]), + tags=(" " + self.tags if self.tags is not None else ""), meta=(self._stringify_metadata(leading_comma=True) - if add_metadata else ""), + if add_metadata else "") )) def descr(self, buf): @@ -522,6 +524,8 @@ def descr(self, buf): if self.metadata: buf.append(self._stringify_metadata(leading_comma=True)) + def get_decl(self): + return '{0} %"{1}"'.format(self.type, self._get_name()) class GEPInstr(Instruction): def __init__(self, parent, ptr, indices, inbounds, name): diff --git a/llvmlite/ir/module.py b/llvmlite/ir/module.py index 464f91ec3..113965764 100644 --- a/llvmlite/ir/module.py +++ b/llvmlite/ir/module.py @@ -17,6 +17,7 @@ def __init__(self, name='', context=context.global_context): self.namedmetadata = {} # Cache for metadata node deduplication self._metadatacache = {} + self.device_triples = None def _fix_metadata_operands(self, operands): fixed_ops = [] @@ -236,8 +237,10 @@ def __repr__(self): lines += [ '; ModuleID = "%s"' % (self.name,), 'target triple = "%s"' % (self.triple,), - 'target datalayout = "%s"' % (self.data_layout,), - ''] + 'target datalayout = "%s"' % (self.data_layout,)] + if self.device_triples is not None: + lines += ['target device_triples = "%s"' % self.device_triples] + lines += [''] # Body lines += self._get_body_lines() # Metadata diff --git a/llvmlite/ir/types.py b/llvmlite/ir/types.py index 00740c488..18d95c0c6 100644 --- a/llvmlite/ir/types.py +++ b/llvmlite/ir/types.py @@ -162,6 +162,26 @@ def __hash__(self): return hash(VoidType) +class TokenType(Type): + """ + The type for tokens. From the LLVM Language Reference. + + 'The token type is used when a value is associated with an + instruction but all uses of the value must not attempt to + introspect or obscure it. As such, it is not appropriate + to have a phi or select of type token.' + """ + + def _to_string(self): + return 'token' + + def __eq__(self, other): + return isinstance(other, TokenType) + + def __hash__(self): + return hash(TokenType) + + class FunctionType(Type): """ The type for functions. From 6f0a9ca32c5364037e7de70d343dab160a3f590a Mon Sep 17 00:00:00 2001 From: "Todd A. Anderson" Date: Wed, 24 May 2023 15:04:05 -0700 Subject: [PATCH 02/11] Formatting issues. --- ffi/file_system.cpp | 18 ++++++++---------- llvmlite/binding/file_system.py | 7 +++++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ffi/file_system.cpp b/ffi/file_system.cpp index 64942b87f..8e106e422 100644 --- a/ffi/file_system.cpp +++ b/ffi/file_system.cpp @@ -11,19 +11,17 @@ extern "C" { API_EXPORT(uint64_t) -LLVMPY_GetDeviceForFile(const char *path) -{ - llvm::sys::fs::UniqueID ID; - llvm::sys::fs::getUniqueID(path, ID); - return ID.getDevice(); +LLVMPY_GetDeviceForFile(const char *path) { + llvm::sys::fs::UniqueID ID; + llvm::sys::fs::getUniqueID(path, ID); + return ID.getDevice(); } API_EXPORT(uint64_t) -LLVMPY_GetFileIdForFile(const char *path) -{ - llvm::sys::fs::UniqueID ID; - llvm::sys::fs::getUniqueID(path, ID); - return ID.getFile(); +LLVMPY_GetFileIdForFile(const char *path) { + llvm::sys::fs::UniqueID ID; + llvm::sys::fs::getUniqueID(path, ID); + return ID.getFile(); } } // end extern C diff --git a/llvmlite/binding/file_system.py b/llvmlite/binding/file_system.py index 5280269fb..3e2fcda25 100644 --- a/llvmlite/binding/file_system.py +++ b/llvmlite/binding/file_system.py @@ -2,16 +2,19 @@ from ctypes import c_char_p, c_uint64 from .common import _encode_string + def getDeviceForFile(path): cp = _encode_string(path) return ffi.lib.LLVMPY_GetDeviceForFile(cp) + def getFileIdForFile(path): cp = _encode_string(path) return ffi.lib.LLVMPY_GetFileIdForFile(cp) + ffi.lib.LLVMPY_GetDeviceForFile.argtypes = [c_char_p] -ffi.lib.LLVMPY_GetDeviceForFile.restype = c_uint64 +ffi.lib.LLVMPY_GetDeviceForFile.restype = c_uint64 ffi.lib.LLVMPY_GetFileIdForFile.argtypes = [c_char_p] -ffi.lib.LLVMPY_GetFileIdForFile.restype = c_uint64 +ffi.lib.LLVMPY_GetFileIdForFile.restype = c_uint64 From 4427e84f560dfdfcdae3bf021a6f812c0dfe626f Mon Sep 17 00:00:00 2001 From: "Todd A. Anderson" Date: Wed, 24 May 2023 15:13:27 -0700 Subject: [PATCH 03/11] Formatting issues. --- llvmlite/ir/builder.py | 7 ++++--- llvmlite/ir/instructions.py | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/llvmlite/ir/builder.py b/llvmlite/ir/builder.py index f2eb9c86f..a379f9528 100644 --- a/llvmlite/ir/builder.py +++ b/llvmlite/ir/builder.py @@ -777,8 +777,8 @@ def store(self, value, ptr, align=None): % (value.type, ptr.type)) else: if not isinstance(ptr.type, types.PointerType): - raise TypeError("cannot store to value of type %s (%r): not a pointer" - % (ptr.type, str(ptr))) + msg = "cannot store to value of type %s (%r): not a pointer" + raise TypeError(msg % (ptr.type, str(ptr))) if ptr.type.pointee != value.type: raise TypeError("cannot store %s to %s: mismatching types" % (value.type, ptr.type)) @@ -885,7 +885,8 @@ def call(self, fn, args, name='', cconv=None, tail=False, fastmath=(), """ inst = instructions.CallInstr(self.block, fn, args, name=name, cconv=cconv, tail=tail, fastmath=fastmath, - attrs=attrs, arg_attrs=arg_attrs, tags=tags) + attrs=attrs, arg_attrs=arg_attrs, + tags=tags) self._insert(inst) return inst diff --git a/llvmlite/ir/instructions.py b/llvmlite/ir/instructions.py index 0b18691cc..4423f85b2 100644 --- a/llvmlite/ir/instructions.py +++ b/llvmlite/ir/instructions.py @@ -156,7 +156,8 @@ def descr_arg(i, a): if self.tail: tail_marker = "{0} ".format(self.tail) - buf.append("{tail}{op}{fastmath} {callee}({args}){attr}{tags}{meta}\n".format( + msg = "{tail}{op}{fastmath} {callee}({args}){attr}{tags}{meta}\n" + buf.append(msg.format( tail=tail_marker, op=self.opname, fastmath=''.join([" " + attr for attr in self.fastmath]), @@ -527,6 +528,7 @@ def descr(self, buf): def get_decl(self): return '{0} %"{1}"'.format(self.type, self._get_name()) + class GEPInstr(Instruction): def __init__(self, parent, ptr, indices, inbounds, name): typ = ptr.type From c55c8a242e4a98eda6cf9016bcfa793b6b35648a Mon Sep 17 00:00:00 2001 From: "Todd A. Anderson" Date: Wed, 24 May 2023 15:49:57 -0700 Subject: [PATCH 04/11] Add file_system.o to be built for freebsd and osx. --- ffi/Makefile.freebsd | 2 +- ffi/Makefile.osx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ffi/Makefile.freebsd b/ffi/Makefile.freebsd index 7b869e876..251fa8fb0 100644 --- a/ffi/Makefile.freebsd +++ b/ffi/Makefile.freebsd @@ -11,7 +11,7 @@ LIBS = $(LLVM_LIBS) INCLUDE = core.h SRC = assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp \ executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp \ - linker.cpp object_file.cpp + linker.cpp object_file.cpp file_system.cpp OUTPUT = libllvmlite.so all: $(OUTPUT) diff --git a/ffi/Makefile.osx b/ffi/Makefile.osx index a0d06db4f..0421eb28c 100644 --- a/ffi/Makefile.osx +++ b/ffi/Makefile.osx @@ -8,7 +8,7 @@ LIBS = $(LLVM_LIBS) INCLUDE = core.h SRC = assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp \ executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp \ - linker.cpp object_file.cpp custom_passes.cpp orcjit.cpp + linker.cpp object_file.cpp custom_passes.cpp orcjit.cpp file_system.cpp OUTPUT = libllvmlite.dylib MACOSX_DEPLOYMENT_TARGET ?= 10.9 From 2228ba7c7fd1c7688e5c584386e003ae53e7f140 Mon Sep 17 00:00:00 2001 From: "Todd A. Anderson" Date: Tue, 30 May 2023 16:54:03 -0700 Subject: [PATCH 05/11] Add documentation for callsite operand bundles and TokenTypes. --- docs/source/user-guide/ir/ir-builder.rst | 6 +++++- docs/source/user-guide/ir/types.rst | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/source/user-guide/ir/ir-builder.rst b/docs/source/user-guide/ir/ir-builder.rst index 61ede913a..b20e0d4cd 100644 --- a/docs/source/user-guide/ir/ir-builder.rst +++ b/docs/source/user-guide/ir/ir-builder.rst @@ -517,7 +517,7 @@ Function call --------------- .. method:: IRBuilder.call(fn, args, name='', cconv=None, tail=None, \ - fastmath=(), attrs=(), arg_attrs=None) + fastmath=(), attrs=(), arg_attrs=None, tags=None) Call function *fn* with arguments *args*, a sequence of values. @@ -548,6 +548,10 @@ Function call the attributes to attach to the respective argument at this call site. If an index is not present in the dictionary, or *arg_attrs* is missing entirely, no attributes are emitted for the given argument. + * *tags* is a string containing an LLVM operand bundle to + associate with this call. + For more information about operand bundles, see the + `official LLVM documentation `_. If some attributes, such as ``sret``, are specified at the function declaration, they must also be specified at each call site for diff --git a/docs/source/user-guide/ir/types.rst b/docs/source/user-guide/ir/types.rst index 52d04d251..420d2a300 100644 --- a/docs/source/user-guide/ir/types.rst +++ b/docs/source/user-guide/ir/types.rst @@ -198,3 +198,17 @@ Other types NOTE: This class was previously called "MetaData," but it was renamed for clarity. + + +.. class:: TokenType + + The type for tokens which, from the LLVM language reference, are used + when a value is associated with an instruction but all uses of the + value must not attempt to introspect or obscure it. One use of this + is to associate matching pseudo-calls that demarcate a region of code. + + EXAMPLE:: + + token_type = ir.TokenType() + start_region_fnty = ir.FunctionType(token_type, (...)) + end_region_fnty = ir.FunctionType(ir.Type.void(), (token_type,)) From 6796df07dab33db5cfd15784e36d50945a0c614e Mon Sep 17 00:00:00 2001 From: "Todd A. Anderson" Date: Tue, 30 May 2023 16:54:33 -0700 Subject: [PATCH 06/11] Add a test for both callsite operand bundles and TokenTypes. --- llvmlite/tests/test_ir.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/llvmlite/tests/test_ir.py b/llvmlite/tests/test_ir.py index 82bcef352..3406a25b8 100644 --- a/llvmlite/tests/test_ir.py +++ b/llvmlite/tests/test_ir.py @@ -1400,6 +1400,29 @@ def test_call_tail(self): tail call void @"my_fun"() """) # noqa E501 + def test_call_tags(self): + block = self.block(name='my_block') + builder = ir.IRBuilder(block) + token_ty = ir.TokenType() + sfun_ty = ir.FunctionType(token_ty, ()) + efun_ty = ir.FunctionType(ir.VoidType(), (token_ty,)) + sfun = ir.Function(builder.function.module, sfun_ty, 'start_fun') + efun = ir.Function(builder.function.module, efun_ty, 'end_fun') + cres = builder.call( + sfun, + (), + tags="[\"SOME_STRING\"(), \"SOME_OTHER_STRING\"(i64* %\"$const1\")]" + ) + builder.call( + efun, + (cres,) + ) + self.check_block(block, """\ + my_block: + %".6" = call token @"start_fun"() ["SOME_STRING"(), "SOME_OTHER_STRING"(i64* %"$const1")] + call void @"end_fun"(token %".6") + """) # noqa E501 + def test_invalid_call_attributes(self): block = self.block() builder = ir.IRBuilder(block) From 0d3525eb5d5e00aadc262491455c0777be1fb85c Mon Sep 17 00:00:00 2001 From: "Todd A. Anderson" Date: Tue, 30 May 2023 16:55:02 -0700 Subject: [PATCH 07/11] Add documentation for file system related functions. --- docs/source/user-guide/binding/file-system.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docs/source/user-guide/binding/file-system.rst diff --git a/docs/source/user-guide/binding/file-system.rst b/docs/source/user-guide/binding/file-system.rst new file mode 100644 index 000000000..2ed25460a --- /dev/null +++ b/docs/source/user-guide/binding/file-system.rst @@ -0,0 +1,17 @@ +=========== +File system +=========== + +.. currentmodule:: llvmlite.binding + +.. function:: getDeviceForFile(path) + + Gets the llvm::sys::fs::UniqueID associated with the given file path + and then returns the device associated with that path through a call to + LLVM's getDevice method on that UniqueID. + +.. function:: getFileIdForFile(path) + + Gets the llvm::sys::fs::UniqueID associated with the given file path + and then returns the file ID associated with that path through a call to + LLVM's getFile method on that UniqueID. From 0364fc397f2522f1741d06f7f5c0834bc0361e52 Mon Sep 17 00:00:00 2001 From: "Todd A. Anderson" Date: Tue, 30 May 2023 16:56:40 -0700 Subject: [PATCH 08/11] Make file system docs appear in list of sections. --- docs/source/user-guide/binding/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/user-guide/binding/index.rst b/docs/source/user-guide/binding/index.rst index 5199ef149..a5c91a8d6 100644 --- a/docs/source/user-guide/binding/index.rst +++ b/docs/source/user-guide/binding/index.rst @@ -31,6 +31,7 @@ implement Numba_'s JIT compiler. optimization-passes analysis-utilities pass_timings + file-system misc examples From 9f4640a0fccc7eaa3091fa393fc3c1ff0221da85 Mon Sep 17 00:00:00 2001 From: "Todd A. Anderson" Date: Tue, 30 May 2023 17:19:30 -0700 Subject: [PATCH 09/11] Add tests for file system functions. --- llvmlite/tests/test_binding.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvmlite/tests/test_binding.py b/llvmlite/tests/test_binding.py index 775c2f067..b5bf8e8b5 100644 --- a/llvmlite/tests/test_binding.py +++ b/llvmlite/tests/test_binding.py @@ -720,6 +720,11 @@ def test_no_accidental_warnings(self): cmdargs = [sys.executable, flags, "-c", code] subprocess.check_call(cmdargs) + def test_getDeviceForFile(self): + self.assertTrue(llvm.getDeviceForFile(__file__) != 0) + + def test_getFileIdForFile(self): + self.assertTrue(llvm.getFileIdForFile(__file__) != 0) class TestModuleRef(BaseTest): From bd528c38e2e51d4be9bfda3ff1d36e8e21145c4b Mon Sep 17 00:00:00 2001 From: "Todd A. Anderson" Date: Tue, 30 May 2023 17:19:59 -0700 Subject: [PATCH 10/11] Fix duplicate explicit target name. --- docs/source/user-guide/ir/ir-builder.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/user-guide/ir/ir-builder.rst b/docs/source/user-guide/ir/ir-builder.rst index b20e0d4cd..aaf800d0c 100644 --- a/docs/source/user-guide/ir/ir-builder.rst +++ b/docs/source/user-guide/ir/ir-builder.rst @@ -686,7 +686,7 @@ Inline assembler * *name* is the optional name of the returned LLVM value. For more information about these parameters, see the - `official LLVM documentation `_. + `LLVM operand bundle documentation `_. EXAMPLE: Adding 2 64-bit values on x86:: From 8fe3f5646434832ff3f2f1e78b0d14f2b754b3dc Mon Sep 17 00:00:00 2001 From: "Todd A. Anderson" Date: Tue, 30 May 2023 17:27:38 -0700 Subject: [PATCH 11/11] Fix flake8. --- llvmlite/tests/test_binding.py | 1 + 1 file changed, 1 insertion(+) diff --git a/llvmlite/tests/test_binding.py b/llvmlite/tests/test_binding.py index b5bf8e8b5..89eb0c5cd 100644 --- a/llvmlite/tests/test_binding.py +++ b/llvmlite/tests/test_binding.py @@ -726,6 +726,7 @@ def test_getDeviceForFile(self): def test_getFileIdForFile(self): self.assertTrue(llvm.getFileIdForFile(__file__) != 0) + class TestModuleRef(BaseTest): def test_str(self):