This is an archive of the discontinued LLVM Phabricator instance.

[EHStreamer] Ensure CallSiteEntry::{BeginLabel,EndLabel} are non-null. NFC
ClosedPublic

Authored by MaskRay on Sep 20 2020, 10:59 PM.

Diff Detail

Event Timeline

MaskRay created this revision.Sep 20 2020, 10:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2020, 10:59 PM
MaskRay requested review of this revision.Sep 20 2020, 10:59 PM
rahmanl added inline comments.Sep 21 2020, 9:32 AM
llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
272

I am not sure if this is correct. When reaching the end of one MBB, we must be able to use the end label of that MBB and the begin label here.

Instead, why don't you change the definition of LastLabel to
MCSymbol *LastLabel = Asm->getFunctionBegin();

Then you don't need to change this LastLabel argument here and the line below.

517

Good cleanup!

MaskRay updated this revision to Diff 293205.Sep 21 2020, 9:45 AM
MaskRay marked an inline comment as done.

Instead, why don't you change the definition of LastLabel to
MCSymbol *LastLabel = Asm->getFunctionBegin();

Then you don't need to change this LastLabel argument here and the line below.

Thanks, good suggestion! Adopted.

LGTM.
Please just keep in mind that call-site-table is not rigorously tested in LLVM.

LGTM.
Please just keep in mind that call-site-table is not rigorously tested in LLVM.

*Nod* I'll commit this tomorrow so that you can rebase :)

@rahmanl The patch will look better if you can give a more formal approval :)

rahmanl accepted this revision.Sep 22 2020, 1:31 PM
This revision is now accepted and ready to land.Sep 22 2020, 1:31 PM