未验证 提交 cdfd7319 编写于 作者: S SingleAccretion 提交者: GitHub

Allow null-based ARR_ADDRs (#67486)

We can sometimes see trees like "ARR_ADDR(long 0)" that are the
result of morph's folding logic.

In general it does not seem great to allow folding of BYREFs
into LONGs like that, but it is also not incorrect per-se.
上级 041933fd
......@@ -5788,7 +5788,7 @@ public:
, m_elemType(elemType)
, m_firstElemOffset(firstElemOffset)
{
assert(addr->TypeIs(TYP_BYREF));
assert(addr->TypeIs(TYP_BYREF) || addr->IsIntegralConst(0));
assert(((elemType == TYP_STRUCT) && (elemClassHandle != NO_CLASS_HANDLE)) ||
(elemClassHandle == NO_CLASS_HANDLE));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册