diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-05-22 16:04:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-22 16:04:42 +0100 |
| commit | c383e550f9da373631bea702c4614f62eb7ad804 (patch) | |
| tree | add4106cbde3d52df97cef761622a0719ded61a6 /src/llvm_backend_const.cpp | |
| parent | ea65a7b870736311747c517970df3921d227e024 (diff) | |
| parent | 93d2e6aca2c771477b133af0decfefa3eb607ab9 (diff) | |
Merge branch 'master' into bill/raddebugger-custom-section
Diffstat (limited to 'src/llvm_backend_const.cpp')
| -rw-r--r-- | src/llvm_backend_const.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp index dada2cff5..51c8a4449 100644 --- a/src/llvm_backend_const.cpp +++ b/src/llvm_backend_const.cpp @@ -533,7 +533,10 @@ gb_internal lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, lb Entity *e = entity_from_expr(expr); res = lb_find_procedure_value_from_entity(m, e); } - GB_ASSERT(res.value != nullptr); + if (res.value == nullptr) { + // This is an unspecialized polymorphic procedure, return nil or dummy value + return lb_const_nil(m, original_type); + } GB_ASSERT(LLVMGetValueKind(res.value) == LLVMFunctionValueKind); if (LLVMGetIntrinsicID(res.value) == 0) { |