[NFC] Fixing a gcc compiler warning.
authorPuyan Lotfi <puyan@puyan.org>
Tue, 8 Sep 2020 23:42:38 +0000 (19:42 -0400)
committerPuyan Lotfi <puyan@puyan.org>
Tue, 8 Sep 2020 23:44:33 +0000 (19:44 -0400)
warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]

Differential Revision: https://reviews.llvm.org/D86952

llvm/include/llvm/CodeGen/StableHashing.h

index c6113aa..caf27e1 100644 (file)
@@ -40,7 +40,7 @@ inline void stable_hash_append(stable_hash &Hash, const char Value) {
 
 inline void stable_hash_append(stable_hash &Hash, stable_hash Value) {
   for (unsigned I = 0; I < 8; ++I) {
-    stable_hash_append(Hash, (const char)Value);
+    stable_hash_append(Hash, static_cast<char>(Value));
     Value >>= 8;
   }
 }