[llvm] 72c0fc2 - [LTO] Remove an unnecessary cast (NFC) (#146275)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 29 19:19:42 PDT 2025


Author: Kazu Hirata
Date: 2025-06-29T19:19:38-07:00
New Revision: 72c0fc2305047c481480d8ebee1e393cf1fd0727

URL: https://github.com/llvm/llvm-project/commit/72c0fc2305047c481480d8ebee1e393cf1fd0727
DIFF: https://github.com/llvm/llvm-project/commit/72c0fc2305047c481480d8ebee1e393cf1fd0727.diff

LOG: [LTO] Remove an unnecessary cast (NFC) (#146275)

&I is already of const uint8_t *.

Added: 
    

Modified: 
    llvm/lib/LTO/LTO.cpp

Removed: 
    


################################################################################
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