Xiangling_L added inline comments.
================
Comment at: clang/lib/AST/ASTContext.cpp:2506
 
   if (!Target->allowsLargerPreferedTypeAlignment())
     return ABIAlign;
----------------
jyknight wrote:
> I think from here on down is currently X86-specific, even though it's not 
> phrased that way right now.
> 
> It only applies if this target hook doesn't disable it, and if alignof(X) < 
> sizeof(X), for X in {double, long long, unsigned long long}. It would be good 
> to try to determine if there's any other platforms for which those conditions 
> actually exist today, other than x86-32. And then determine if this code 
> block actually _should_ trigger there. (I suspect not.) Then, mark this stuff 
> as truthfully completely-target-specific, instead of pretending otherwise, as 
> we do now.
> 
Thank you for your suggestion. I think currently, there are three targets 
disabling this query, `XCore`, `X86` and `MSP430`. Since @efriedma mentioned we 
tried to avoid OS-specific checks here, I am not sure if mark this 
`completely-target-specific` is a good idea?  Personally, I think a query like 
`allowsLargerPreferedTypeAlignment()` would give more semantic meaning.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79719/new/

https://reviews.llvm.org/D79719



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

Reply via email to