================
@@ -1053,6 +1054,37 @@ void CodeGenFunction::StartFunction(GlobalDecl GD,
QualType RetTy,
}
}
+ // Annotate C++ special member functions so that CopyProfPass can instrument
+ // them, provided the object is at least as large as the size threshold.
+ if (CGM.getCodeGenOpts().CopyProf) {
+ const auto *MD = dyn_cast_or_null<CXXMethodDecl>(D);
+ const auto *CD = MD ? dyn_cast<CXXConstructorDecl>(MD) : nullptr;
+ // It's either some sort of c'tor (but not any move function), or either of
+ // copy assignment operator / d'tor.
+ bool IsCandidate =
----------------
snehasish wrote:
Personal preference influenced by the Google style guide. :)
https://github.com/llvm/llvm-project/pull/225905
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits