[PATCH] D154145: [HIP] Fix -mllvm option for device lld linker

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 30 09:52:09 PDT 2023


yaxunl marked 2 inline comments as done.
yaxunl added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/HIPAMD.cpp:164
+    StringRef ArgVal = Arg->getValue(1);
+    if (ArgVal.startswith("-mllvm=")) {
+      ArgVal = ArgVal.substr(strlen("-mllvm="));
----------------
jhuber6 wrote:
> arsenm wrote:
> > StringRef Prefix("-mllvm=") and then use the length instead of strlen
> You could probably also do `ArgVal.split("-mllvm=").second` and push back first or second depending on whether or not `second` is empty.
will use ArgVal.split


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

https://reviews.llvm.org/D154145



More information about the cfe-commits mailing list