Skip to content

Conversation

@natanelh-mobileye
Copy link
Contributor

trying to avoid unused variable warning under gcc7

@llvmbot
Copy link
Member

llvmbot commented Feb 4, 2025

@llvm/pr-subscribers-llvm-adt

Author: None (natanelh-mobileye)

Changes

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 --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;
 }
 

@natanelh-mobileye natanelh-mobileye force-pushed the patch-1 branch 3 times, most recently from b268475 to 67e2c7f Compare February 5, 2025 22:09
@natanelh-mobileye
Copy link
Contributor Author

@kuhar what am I doing wrong? what should I do to get that change in?

trying to avoid `unused variable` warning under gcc7
@kuhar kuhar merged commit f48d9e9 into llvm:main Feb 6, 2025
6 of 7 checks passed
@kuhar
Copy link
Member

kuhar commented Feb 6, 2025

@kuhar what am I doing wrong? what should I do to get that change in?

We don't have automatic merging and someone has to press a button. I didn't realize that you wanted me to do it; next time you can ask the approver to merge it for you.

Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
trying to avoid `unused variable` warning under gcc7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants