[PATCH] D52680: Add comments explaning variables in action table generation (NFC)
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 2 13:28:15 PDT 2018
aheejin updated this revision to Diff 168010.
aheejin added a comment.
I simplified the comments a little. I don't think LLVM developer policy is
against simple-ish comments, as long as they are relevant and they help
understanding. I also don't think adding simple comments are 'polluting' the
code. The code logic and variable meanings here might seem obvious to some
people but I found it a bit confusing, and I also think there can be people
like that too.
Renaming those variables might be a good idea too, but I couldn't find better
names. I find they get too long if I want to include their meanings in their
names. Do you have suggestions for the names?
Changes:
- Remove `SizeTypeID`, because it's more on the obvious side
- Delete 'usually' clauses
Repository:
rL LLVM
https://reviews.llvm.org/D52680
Files:
lib/CodeGen/AsmPrinter/EHStreamer.cpp
Index: lib/CodeGen/AsmPrinter/EHStreamer.cpp
===================================================================
--- lib/CodeGen/AsmPrinter/EHStreamer.cpp
+++ lib/CodeGen/AsmPrinter/EHStreamer.cpp
@@ -98,6 +98,9 @@
FirstActions.reserve(LandingPads.size());
+ // SizeActions: size of all action entries for a function
+ // SizeSiteActions: size of all action entries for one landing pad
+ // SizeAction: size of an action entry (size of typeid + size of next action)
int FirstAction = 0;
unsigned SizeActions = 0;
const LandingPadInfo *PrevLPI = nullptr;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52680.168010.patch
Type: text/x-patch
Size: 573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181002/f894c3df/attachment.bin>
More information about the llvm-commits
mailing list