Skip to content

Commit

Permalink
[1.6>1.7] [MERGE #3338 @MikeHolman] assert that function we are JITin…
Browse files Browse the repository at this point in the history
…g has a body

Merge pull request #3338 from MikeHolman:assertbody

There was a bug that caused this not to happen, and it hit null AV on JIT process. This assert should allow us to catch such an issue earlier, when we have more context.

OS: 12457116
  • Loading branch information
MikeHolman committed Jul 24, 2017
2 parents b5ebc92 + 78baecc commit 804093e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Backend/FunctionJITTimeInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ FunctionJITTimeInfo::BuildJITTimeData(
jitData->bodyData = AnewStructZ(alloc, FunctionBodyDataIDL);
JITTimeFunctionBody::InitializeJITFunctionData(alloc, body, jitData->bodyData);
}
else
{
// outermost function must have a body, but inlinees may not (if they are builtins)
Assert(isInlinee);
}

jitData->localFuncId = codeGenData->GetFunctionInfo()->GetLocalFunctionId();
jitData->isAggressiveInliningEnabled = codeGenData->GetIsAggressiveInliningEnabled();
Expand Down

0 comments on commit 804093e

Please sign in to comment.