[PATCH] D82506: [HIP] Add missing options for lto
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 24 16:20:17 PDT 2020
tra added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/HIP.cpp:76
+ MAttrString.append(Args.MakeArgString(OneFeature));
+ if (OneFeature != Features.back())
+ MAttrString.append(",");
----------------
I think StringRef will result in comparison by value. If we happen to have duplicate features, we may end up skipping a comma.
You need to either iterate ofer the pointers to elements of the Features, or use a different method of figuring out if a comma is necessary.
E.g. us a bool set at the end of the body.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82506/new/
https://reviews.llvm.org/D82506
More information about the cfe-commits
mailing list