Skip to content

Commit 3ee8e2a

Browse files
committed
[MERGE #5873 @rajatd] Bug fix in getting callback def instr
Merge pull request #5873 from rajatd:bugfix
2 parents 41db1fe + 72fd7bc commit 3ee8e2a

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)