[llvm] [gold] Don't pass StringRef to message() (PR #95083)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 03:57:23 PDT 2024


================
@@ -307,7 +307,8 @@ namespace options {
     } else if (opt.consume_front("opt-remarks-hotness-threshold=")) {
       auto ResultOrErr = remarks::parseHotnessThresholdOption(opt);
       if (!ResultOrErr)
-        message(LDPL_FATAL, "Invalid remarks hotness threshold: %s", opt);
+        message(LDPL_FATAL, "Invalid remarks hotness threshold: %s",
+                opt.data());
----------------
lipracer wrote:

Can we directly use the variable opt_?

https://github.com/llvm/llvm-project/pull/95083


More information about the llvm-commits mailing list