[PATCH] D134189: [CUDA][HIP] Fix new driver crashing when using -save-temps in RDC-mode
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 19 11:59:42 PDT 2022
tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.
LGTM with a few nits.
================
Comment at: clang/include/clang/Driver/Action.h:304
+ /// Add a action along with the associated toolchain, bound arch, and
+ /// offload kinds.
----------------
Nit: Add a*n* action
================
Comment at: clang/include/clang/Driver/Action.h:307
+ void add(Action &A, const ToolChain &TC, const char *BoundArch,
+ unsigned Mask);
+
----------------
Nit: `OffloadKindMask`?
================
Comment at: clang/lib/Driver/Action.cpp:320
+ if (OKind & Mask)
+ DeviceOffloadKinds.push_back(OKind);
+}
----------------
It would be good to clear processed bits in `Mask` and then assert that it's zero after we're done. Otherwise it would be easy to miss handling a new offload kind if/when it gets added.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134189/new/
https://reviews.llvm.org/D134189
More information about the cfe-commits
mailing list