[PATCH] D68818: [hip][cuda] Fix the extended lambda name mangling issue.

Michael Liao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 10 10:32:36 PDT 2019


hliao marked 2 inline comments as done.
hliao added a comment.

minor comment to help review.

BTW, as the AST ser/deser is changed as well, not sure we have compatibility issue and, if there is, how to handle that. please advice me on that concern. Thanks.



================
Comment at: clang/include/clang/AST/DeclCXX.h:587-590
+    unsigned NumExplicitCaptures : 12;
+
+    /// Has known `internal` linkage.
+    unsigned HasKnownInternalLinkage : 1;
----------------
Try to avoid inflating memory footprint by borrowing one bit from `NumExplicitCaptures`. It seems to me that we won't have that large number (8192) of *explicit* capture.


================
Comment at: clang/lib/Sema/SemaLambda.cpp:432
+
+void Sema::handleLambdaNumbering(
+    CXXRecordDecl *Class, CXXMethodDecl *Method,
----------------
extracted from `startLambdaDefinition` so that we could have a single place to handle mangling numbers based on CUDA attributes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68818/new/

https://reviews.llvm.org/D68818





More information about the cfe-commits mailing list