[llvm] [nfc] Ignoring unused values (PR #125695)

via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 06:53:39 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-adt

Author: None (natanelh-mobileye)

<details>
<summary>Changes</summary>

trying to avoid `unused variable` warning under gcc7

---
Full diff: https://github.com/llvm/llvm-project/pull/125695.diff


1 Files Affected:

- (modified) llvm/include/llvm/ADT/StableHashing.h (+3-3) 


``````````diff
diff --git a/llvm/include/llvm/ADT/StableHashing.h b/llvm/include/llvm/ADT/StableHashing.h
index b220a0ed1f9131..964e4d52a932c4 100644
--- a/llvm/include/llvm/ADT/StableHashing.h
+++ b/llvm/include/llvm/ADT/StableHashing.h
@@ -54,13 +54,13 @@ inline stable_hash stable_hash_combine(stable_hash A, stable_hash B,
 // maintain closeness to the original name across different builds.
 inline StringRef get_stable_name(StringRef Name) {
   // Return the part after ".content." that represents contents.
-  auto [P0, S0] = Name.rsplit(".content.");
+  auto [std::ignore, S0] = Name.rsplit(".content.");
   if (!S0.empty())
     return S0;
 
   // Ignore these suffixes.
-  auto [P1, S1] = Name.rsplit(".llvm.");
-  auto [P2, S2] = P1.rsplit(".__uniq.");
+  auto [P1, std::ignore] = Name.rsplit(".llvm.");
+  auto [P2, std::ignore] = P1.rsplit(".__uniq.");
   return P2;
 }
 

``````````

</details>


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


More information about the llvm-commits mailing list