[PATCH] D82506: [HIP] Add missing options for lto

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 25 10:14:22 PDT 2020


yaxunl marked an inline comment as done.
yaxunl added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/HIP.cpp:76
+    MAttrString.append(Args.MakeArgString(OneFeature));
+    if (OneFeature != Features.back())
+      MAttrString.append(",");
----------------
tra wrote:
> 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.
> 
> 
> 
Fixed by using unifyTargetFeatures. This makes sure the features are unique.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82506/new/

https://reviews.llvm.org/D82506





More information about the cfe-commits mailing list