[PATCH] D141775: [Clang] Export CanPassInRegisters as a type trait
Roy Jacobson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 17 13:57:06 PST 2023
royjacobson added inline comments.
================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:5387
+ return RD->canPassInRegisters();
+ return true;
}
----------------
shafik wrote:
> erichkeane wrote:
> > Is there good reason to return true for all non-record types? Should we instead be limiting the types that can make it this far?
> Looking how it is used internally, I think it makes sense to restrict this to records.
My initial thinking was 'well references/builtins ARE passed by registers'. But I thought about this a bit and I agree with you, it's probably better to restrict this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141775/new/
https://reviews.llvm.org/D141775
More information about the cfe-commits
mailing list