Skip to content

Commit 72fd7bc

Browse files
committed
Bug fix in getting callback def instr
1 parent 28cd467 commit 72fd7bc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Backend/Inline.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,10 @@ IR::Instr * Inline::TryGetCallbackDefInstrForCallInstr(IR::Instr * callInstr)
10281028
IR::Instr * Inline::TryGetCallbackDefInstrForCallApplyTarget(IR::Instr * callApplyLdInstr)
10291029
{
10301030
// Try to find a function argument that could be inlined.
1031+
if (!callApplyLdInstr->GetSrc1()->IsSymOpnd() || !callApplyLdInstr->GetSrc1()->AsSymOpnd()->IsPropertySymOpnd())
1032+
{
1033+
return nullptr;
1034+
}
10311035
StackSym * callbackSym = callApplyLdInstr->GetSrc1()->AsPropertySymOpnd()->GetObjectSym();
10321036
Assert(callbackSym != nullptr);
10331037
return TryGetCallbackDefInstr(callbackSym);

0 commit comments

Comments
 (0)