rjmccall added a comment.

In https://reviews.llvm.org/D30345#688298, @arphaman wrote:

> In https://reviews.llvm.org/D30345#688144, @rjmccall wrote:
>
> > You're doing this refactor to... support doing another refactor of the same 
> > code?  Why are these patches separate?
>
>
> Not quite, by "merging block copy/destroy routines" I meant that my next 
> patch will try to generate the IR only for unique copy/destroy functions, so 
> individual functions will be merged.


Ah, okay, sure.



================
Comment at: lib/CodeGen/CGBlocks.cpp:1380
+/// entity that's captured by a block.
+enum class BlockCaptureEntityType {
+  CXXRecord, // Copy or destroy
----------------
BlockCaptureEntityKind, please.


================
Comment at: lib/CodeGen/CGBlocks.cpp:1389
+/// Represents an entity captured by a block that requires custom operations
+/// to copy/release this entity.
+struct BlockCaptureManagedEntity {
----------------
Grammar, and the complementary generic operation to "copy" is "destroy", not 
"release".


================
Comment at: lib/CodeGen/CGBlocks.cpp:1391
+struct BlockCaptureManagedEntity {
+  BlockCaptureEntityType Type;
+  BlockFieldFlags Flags;
----------------
Similarly, please name this Kind.


================
Comment at: lib/CodeGen/CGBlocks.cpp:1608
+static std::pair<BlockCaptureEntityType, BlockFieldFlags>
+computeDestroyInfoForBlockCapture(const BlockDecl::Capture &CI, QualType Type,
+                                  const LangOptions &LangOpts) {
----------------
Please don't name local variables "Type".  "QT" or "T" would be fine.


Repository:
  rL LLVM

https://reviews.llvm.org/D30345



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to