This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][iwyu] explicitly includes `<algorithm>` in CUDA rtl.cpp
AcceptedPublic

Authored by cjdb on Jul 3 2021, 7:26 PM.

Details

Reviewers
jdoerfert
Summary

Compiling with Clang modules and libc++ identified that rtl.cpp is using
std::fill without first including <algorithm>.

Diff Detail

Event Timeline

cjdb created this revision.Jul 3 2021, 7:26 PM
cjdb requested review of this revision.Jul 3 2021, 7:26 PM
Herald added a project: Restricted Project. · View Herald Transcript
JonChesterfield added inline comments.
openmp/libomptarget/plugins/cuda/src/rtl.cpp
199

std::fill use here, looks like we could memset to avoid including algorithm

jhuber6 added a subscriber: jhuber6.Jul 6 2021, 6:17 AM
jhuber6 added inline comments.
openmp/libomptarget/plugins/cuda/src/rtl.cpp
199

Is it worth avoiding it altogether? It's already included in the AMDGPU plugin, but it doesn't seem to be used for anything there.

jdoerfert accepted this revision.Jul 10 2021, 7:12 PM

LG, thanks for the contribution

This revision is now accepted and ready to land.Jul 10 2021, 7:12 PM
cjdb updated this revision to Diff 360909.Jul 22 2021, 11:39 AM

rebases to activate CI: will merge as soon as it's green