================ @@ -3802,6 +3808,22 @@ OPT_LIST(V) StringRef getCUIDHash() const; + void findPFPFields(QualType Ty, CharUnits Offset, ---------------- pcc wrote:
The code patterns that trigger a call to findPFPFields/hasPFPFields are relatively rare (pass by value/generated copies). And for pass by value the number of fields is expected to be relatively small. So producing the list every time is O(N) where N is the expected-small # of fields vs doing a cache lookup is O(log N) where N is the # of classes in the ASTContext, assuming a side table is used to store the cache. So it's unclear that it would be beneficial to cache it. The offset is there to support recursive calls. Certainly that could be hidden by wrapping the function, no strong opinions about whether to do this or not. https://github.com/llvm/llvm-project/pull/172119 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
