aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-09-15 10:00:50 +0100
committergingerBill <bill@gingerbill.org>2022-09-15 10:00:50 +0100
commitf50fc33749d550187a41b62f203c33549073fbf3 (patch)
treef34732c0db5b9be5bcb7e50da9ab09720f8b6ac4 /src
parent1e595f2e2697342e82af7cae6682378a64ae5897 (diff)
Clean up of the core library to make the stream vtables not be pointers directly.
Diffstat (limited to 'src')
-rw-r--r--src/llvm_backend_const.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp
index 45e597a9e..53c7c4dcb 100644
--- a/src/llvm_backend_const.cpp
+++ b/src/llvm_backend_const.cpp
@@ -390,6 +390,9 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc
Entity *e = entity_from_expr(expr);
res = lb_find_procedure_value_from_entity(m, e);
}
+ GB_ASSERT(res.value != nullptr);
+ GB_ASSERT(LLVMGetValueKind(res.value) == LLVMFunctionValueKind);
+
res.value = LLVMConstPointerCast(res.value, lb_type(m, res.type));
return res;
}