[PATCH] D68660: [tooling] Teach Tooling to understand compilation with offloading.
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 10 13:37:03 PDT 2019
tra added inline comments.
================
Comment at: clang/lib/Tooling/Tooling.cpp:102
+ if (isa<driver::OffloadAction>(A)) {
+ assert(Actions.size() == 2);
+ assert(isa<driver::CompileJobAction>(Actions.front()));
----------------
Why 2? Will it not be different if user targeted multiple GPUs?
================
Comment at: clang/lib/Tooling/Tooling.cpp:103
+ assert(Actions.size() == 2);
+ assert(isa<driver::CompileJobAction>(Actions.front()));
+ OffloadCompilation = true;
----------------
I'd add a comment describing that we expect the first jub to be a (host-side)compilation.
It would not be obvious to someone w/o familiarity of cuda/hip compilation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68660/new/
https://reviews.llvm.org/D68660
More information about the cfe-commits
mailing list