[llvm] [AsmPrinter] Remove an unnecessary cast (NFC) (PR #152085)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 4 22:56:41 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/152085

getValue() already returns uint64_t.


>From 9ecf14e195dcd08edf0bc7ea5b512d29527e0e4c Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Mon, 4 Aug 2025 07:50:01 -0700
Subject: [PATCH] [AsmPrinter] Remove an unnecessary cast (NFC)

getValue() already returns uint64_t.
---
 llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp b/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
index 08ed78eb20a16..a7491a2d272fa 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
@@ -230,7 +230,7 @@ void DIEHash::hashBlockData(const DIE::const_value_range &Values) {
              "Base types referenced from DW_OP_convert should have a name");
       hashNestedType(C, Name);
     } else
-      Hash.update((uint64_t)V.getDIEInteger().getValue());
+      Hash.update(V.getDIEInteger().getValue());
 }
 
 // Hash the contents of a loclistptr class.



More information about the llvm-commits mailing list