forked from OSchip/llvm-project
[MC] [Win64EH] Fix builds with expensive checks enabled
This fixes a failed assert if expensive checks are enabled,
since 1308bb99e0
.
This commit is contained in:
parent
a68673cc06
commit
e6419d320d
|
@ -632,9 +632,11 @@ static int checkPackedEpilog(MCStreamer &streamer, WinEH::FrameInfo *info,
|
|||
if (DistanceFromEnd / 4 != Epilog.size())
|
||||
return -1;
|
||||
|
||||
int Offset = ARM64CountOfUnwindCodes(
|
||||
ArrayRef<WinEH::Instruction>(&info->Instructions[Epilog.size()],
|
||||
info->Instructions.size() - Epilog.size()));
|
||||
int Offset = Epilog.size() == info->Instructions.size()
|
||||
? 0
|
||||
: ARM64CountOfUnwindCodes(ArrayRef<WinEH::Instruction>(
|
||||
&info->Instructions[Epilog.size()],
|
||||
info->Instructions.size() - Epilog.size()));
|
||||
|
||||
// Check that the offset and prolog size fits in the first word; it's
|
||||
// unclear whether the epilog count in the extension word can be taken
|
||||
|
|
Loading…
Reference in New Issue