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

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 23 09:49:48 PDT 2025


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

getTag already returns dwarf::Tag.


>From 7524ed30312a146fab09a73fc109fef00583415b Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 22 Jul 2025 22:01:43 -0700
Subject: [PATCH] [AsmPrinter] Remove an unnecessary cast (NFC)

getTag already returns dwarf::Tag.
---
 llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 8e8cda4eef573..5577a7d298177 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -1379,7 +1379,7 @@ void DwarfCompileUnit::constructCallSiteParmEntryDIEs(
 
 DIE *DwarfCompileUnit::constructImportedEntityDIE(
     const DIImportedEntity *Module) {
-  DIE *IMDie = DIE::get(DIEValueAllocator, (dwarf::Tag)Module->getTag());
+  DIE *IMDie = DIE::get(DIEValueAllocator, Module->getTag());
   insertDIE(Module, IMDie);
   DIE *EntityDie;
   auto *Entity = Module->getEntity();



More information about the llvm-commits mailing list