[PATCH] D47474: Implement cpu_dispatch/cpu_specific Multiversioning
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 18 13:20:59 PDT 2018
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
Aside from an `assert` than can be removed, this LGTM on the attribute side of things.
================
Comment at: lib/CodeGen/CodeGenModule.cpp:2446
+ const auto *FD = cast<FunctionDecl>(GD.getDecl());
+ assert(FD && "Not a FunctionDecl?");
+ const auto *DD = FD->getAttr<CPUDispatchAttr>();
----------------
aaron.ballman wrote:
> `cast<>` already asserts this.
I don't think this is done -- the assert can be removed.
https://reviews.llvm.org/D47474
More information about the cfe-commits
mailing list