[llvm] [LTO] Remove an unnecessary cast (NFC) (PR #146275)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 29 09:36:43 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146275
&I is already of const uint8_t *.
>From 3e34b94bb72f4dcf4f17eaeca1f78405cb1eb101 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 29 Jun 2025 00:20:38 -0700
Subject: [PATCH] [LTO] Remove an unnecessary cast (NFC)
&I is already of const uint8_t *.
---
llvm/lib/LTO/LTO.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 779c98ee4441e..73e79c08a56ca 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -135,7 +135,7 @@ std::string llvm::computeLTOCacheKey(
Hasher.update(Data);
};
auto AddUint8 = [&](const uint8_t I) {
- Hasher.update(ArrayRef<uint8_t>((const uint8_t *)&I, 1));
+ Hasher.update(ArrayRef<uint8_t>(&I, 1));
};
AddString(Conf.CPU);
// FIXME: Hash more of Options. For now all clients initialize Options from
More information about the llvm-commits
mailing list