tra added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:267-268
+    // rocm-{major}.{minor}.{subMinor}[-{build}]
+    auto Loc = StringRef(VerStr).rfind('_');
+    if (Loc != StringRef::npos)
+      VerStr[Loc] = '.';
----------------
You don't need `StringRef` here. `VerStr.rfind()` will do.


================
Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:269
+    if (Loc != StringRef::npos)
+      VerStr[Loc] = '.';
+    V.tryParse(VerStr);
----------------
This only deals with a single `.` in the version. It's likely that we will have 
to deal with a patch release at some point, so you may want to replace all 
instances.



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

https://reviews.llvm.org/D98867

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to