[llvm] [nfc] Ignoring unused values (PR #125695)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 14:06:45 PST 2025
https://github.com/natanelh-mobileye updated https://github.com/llvm/llvm-project/pull/125695
>From b2684754beb125d40c1f311e28369ab749703f61 Mon Sep 17 00:00:00 2001
From: natanelh-mobileye <natanelh at mobileye.com>
Date: Tue, 4 Feb 2025 16:51:30 +0200
Subject: [PATCH] [nfc] Ignoring unused values
trying to avoid `unused variable` warning under gcc7
---
llvm/include/llvm/ADT/StableHashing.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/llvm/include/llvm/ADT/StableHashing.h b/llvm/include/llvm/ADT/StableHashing.h
index b220a0ed1f9131a..b6bd23c6945bf99 100644
--- a/llvm/include/llvm/ADT/StableHashing.h
+++ b/llvm/include/llvm/ADT/StableHashing.h
@@ -54,14 +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.");
+ StringRef S0 = Name.rsplit(".content.").second;
if (!S0.empty())
return S0;
// Ignore these suffixes.
- auto [P1, S1] = Name.rsplit(".llvm.");
- auto [P2, S2] = P1.rsplit(".__uniq.");
- return P2;
+ StringRef P1 = Name.rsplit(".llvm.").first;
+ return P1.rsplit(".__uniq.").first;
}
// Generates a consistent hash value for a given input name across different
More information about the llvm-commits
mailing list