[PATCH] D57716: [CUDA][HIP] Check calling convention based on function target
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 27 10:09:43 PST 2019
rjmccall added inline comments.
================
Comment at: lib/Sema/SemaDeclAttr.cpp:4620
const TargetInfo &TI = Context.getTargetInfo();
- TargetInfo::CallingConvCheckResult A = TI.checkCallingConvention(CC);
+ auto *Aux = Context.getAuxTargetInfo();
+ if (LangOpts.CUDA) {
----------------
yaxunl wrote:
> yaxunl wrote:
> > rjmccall wrote:
> > > Please sink these declarations into the CUDA-specific block. Also, please add some comments to explain why different logic is needed for CUDA.
> > will do. thanks.
> variables A and TI are also used by else part of the if statement, so only variable Aux can be moved in the if part.
Yes, sorry, only your new declaration needs to be sunk.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57716/new/
https://reviews.llvm.org/D57716
More information about the cfe-commits
mailing list