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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to