Skip to content

Commit f51ca9d

Browse files
fix related to LLVM versions
1 parent 2991c33 commit f51ca9d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/lpython/python_evaluator.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,12 @@ Result<PythonCompiler::EvalResult> PythonCompiler::evaluate(
150150
type = type->getStructElementType(2);
151151
LCOMPILERS_ASSERT(type->isPointerTy())
152152
result.structure.element_size = e->get_jit_data_layout().getTypeAllocSize(
153-
type->getNonOpaquePointerElementType());
153+
#if LLVM_VERSION_MAJOR >= 14
154+
type->getNonOpaquePointerElementType()
155+
#else
156+
type->getPointerElementType()
157+
#endif
158+
);
154159
}
155160
}
156161

0 commit comments

Comments
 (0)