diff --git a/example/el_psy_congaroo.py b/example/el_psy_congaroo.py index e200e77..423200c 100644 --- a/example/el_psy_congaroo.py +++ b/example/el_psy_congaroo.py @@ -26,6 +26,6 @@ m = utils.parse_assembly(asm_str) -print(m.context) -# with core.Context.get_global_context() as ctx: -# print(ctx) +assert(m.context == m.context) + +assert(list(m.global_variables)[0].type.context == m.context) diff --git a/src/llvm/Core/value.cpp b/src/llvm/Core/value.cpp index 1b99bdf..003193a 100644 --- a/src/llvm/Core/value.cpp +++ b/src/llvm/Core/value.cpp @@ -157,7 +157,9 @@ void bindValueClasses(nb::module_ &m) { return get_value_str(self.get()); }) .def_prop_ro("type", - [](PymValue &v) { return PymTypeAuto(LLVMTypeOf(v.get())); }) + [](PymValue &v) { + return PymTypeAuto(LLVMTypeOf(v.get())); + }) .def_prop_ro("kind", [](PymValue &v) { return LLVMGetValueKind(v.get()); }) // NOTE LLVMSetValueName and LLVMGetValueName are depreciated