[PATCH] D87448: [CodeGen] [WinException] Only produce handler data at the end of the function if needed
Hans Wennborg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 23 07:40:08 PST 2020
hans added a comment.
Thanks for the pointers!
Comment at: llvm/lib/MC/MCStreamer.cpp:695
+ CurrentProcWinFrameInfoStart = WinFrameInfos.size();
> hans wrote:
> > When I first saw this variable name I thought it was some kind of offset. But now I see it's really an index into WinFrameInfos.
> > Maybe CurrentProcWinFrameInfoIndex would be a better name? And should it be initialized to -1 or some other invalid value rather than 0, since I assume it should always be set here before it's used?
> Initializing to -1 should be fine, this is pretty tightly checked to be called in pairs only.
> I can change the name, but it isn't necessarily the index of one single frame, but the start index to a range of frames, from startindex to the end of the vector.
Maybe StartIndex, then? Or just leave as it is I suppose, it becomes clear when looking at how it's used.
CHANGES SINCE LAST ACTION
More information about the llvm-commits