Set llvm_isNull_ptr to false when the result of codegened expression evaluation is not null
So far we were assuming that the content of `llvm_isNull_ptr` variable, which is passed as
input to expression evaluation, is always `false`. Consequently, when the result of the
expression is not null, we avoid setting `llvm_isNull_ptr` to `false`.
However, this assumption is not correct since in codegen we do not use a temporary `fcinfo`
struct (for perfromance reasons), which initializes `fcinfo->isnull` to `false`.
Instead, we pass a pointer to the isnull variable of the caller directly (which might not
have been inititialized). For example, in `GenerateAdvanceAggregates` we pass a pointer
to `transValueIsNull`.
In this commit, we explicitly set `llvm_isNull_ptr` to `false` when the result is not null.
This will cover all cases that the input is not initialized to `false`.
Signed-off-by: NKarthikeyan Jambu Rajaraman <karthi.jrk@gmail.com>
Showing
想要评论请 注册 或 登录