[PATCH] D96802: [Clang] Add proper target checks for SwiftAsync convention.
Varun Gandhi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 17 14:48:25 PST 2021
varungandhi-apple added a comment.
> The TargetInfo classes are already target-architecture-specific, so it's somewhat strange for them all to funnel to a single function that then immediately switches on the target architecture.
IMO ideally, the whole thing would be stored as a table of Target x CallingConvention. Each entry of the table would have a CallingConvCheckResult. That way, you can quickly figure out both:
- which targets is a calling convention supported for
- what calling conventions are supported for a particular target
Certainly, that's not the state of the code right now. So I do agree with your point that it looks a bit strange. However, given that things are somewhat in flux for `CC_SwiftAsync`, I think it is valuable to centralize the information for it in one place instead of spreading it out over multiple files.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96802/new/
https://reviews.llvm.org/D96802
More information about the cfe-commits
mailing list