[PATCH] D38596: Implement attribute target multiversioning

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 27 08:42:16 PDT 2017

erichkeane marked 2 inline comments as done.
erichkeane added inline comments.

Comment at: include/clang/Basic/Attr.td:1917
+      MVK_All, // All Decls of this function have a 'target' attribute.  None differ
+           // in contents, so this is the 'hint' case.
+      MVK_MultiVersion, // All Decls of this function have a 'target' attribute, some
aaron.ballman wrote:
> Align the comments (at least the wrapped part of them)?
Ugg... I did a ton of work to get these lined up, then format must have had its fun with it.  I'll reflow these again.

Comment at: lib/Sema/SemaDecl.cpp:9366
+  for (const auto *FD : OldFD->redecls())
+    Result = CheckMultiVersionOption(FD) && Result;
aaron.ballman wrote:
> Reverse the conditions so the inexpensive bit is checked first, or early-break if `Result` becomes `false`.
Ah, right... I think for a while during implementation the "Check" function was doing important work, but this must have been fixed along the way.  Fix incoming!


More information about the cfe-commits mailing list