Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
asm: convert type of null callee to pointer to function type
Note sure when you'd want to call a null function, but since its valid LLVM IR we should ensure that the null constant has the correct type, which is pointer to function type for all callees. An old but related issue #33.
- Loading branch information
9637c11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible we may wish to revert this commit and rethink how callee types are computed.
A lot of the constant expression type mismatches are also related to func type vs pointer to func type mismatches (e.g.
constant expression type mismatch; expected "void (void ()*, void ()*)*", got "void (void ()*, void ()*)"
.We need to figure out a consistent way to handle the types of callees, the underlying value of which may be either
constant.Expression
(e.b.bitcast
,select
),*ir.Func
,*ir.InlineAsm
or*ir.Alias
.Edit: reversing for now.