提交 2a65b0aa 编写于 作者: F Foyzur Rahman 提交者: Shreedhar Hardikar

Fix slot function nullptr issue in expr eval.

Signed-off-by: NKarthikeyan Jambu Rajaraman <karthi.jrk@gmail.com>
上级 3107fc0e
......@@ -118,16 +118,17 @@ bool ExecEvalExprCodegen::GenerateExecEvalExpr(
return false;
}
// In case the generation above either failed or was not needed,
// If slot_getattr_codegen_ is not set or generation fails
// we revert to use the external slot_getattr()
if (nullptr == slot_getattr_codegen_) {
if (nullptr == slot_getattr_codegen_ ||
false == slot_getattr_codegen_->GenerateCode(codegen_utils)) {
gen_info_.llvm_slot_getattr_func =
codegen_utils->GetOrRegisterExternalFunction(slot_getattr,
"slot_getattr");
} else {
slot_getattr_codegen_->GenerateCode(codegen_utils);
gen_info_.llvm_slot_getattr_func =
slot_getattr_codegen_->GetGeneratedFunction();
slot_getattr_codegen_->GetGeneratedFunction();
assert(nullptr != gen_info_.llvm_slot_getattr_func);
}
llvm::Function* exec_eval_expr_func = CreateFunction<ExecEvalExprFn>(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册