[llvm] adbf59d - [AsmPrinter] Remove an unnecessary cast (NFC) (#150839)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 27 10:43:41 PDT 2025
Author: Kazu Hirata
Date: 2025-07-27T10:43:37-07:00
New Revision: adbf59dafab9d32f44c3f191febab683d7ad5a0d
URL: https://github.com/llvm/llvm-project/commit/adbf59dafab9d32f44c3f191febab683d7ad5a0d
DIFF: https://github.com/llvm/llvm-project/commit/adbf59dafab9d32f44c3f191febab683d7ad5a0d.diff
LOG: [AsmPrinter] Remove an unnecessary cast (NFC) (#150839)
getLabelAfterInsn() already returns MCSymbol *.
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 11b85763a3fb1..71888332a6620 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -972,10 +972,9 @@ void DwarfDebug::constructCallSiteEntryDIEs(const DISubprogram &SP,
// the call graph which could lead to some target function. For tail
// calls, no return PC information is needed, unless tuning for GDB in
// DWARF4 mode in which case we fake a return PC for compatibility.
- const MCSymbol *PCAddr =
- (!IsTail || CU.useGNUAnalogForDwarf5Feature())
- ? const_cast<MCSymbol *>(getLabelAfterInsn(TopLevelCallMI))
- : nullptr;
+ const MCSymbol *PCAddr = (!IsTail || CU.useGNUAnalogForDwarf5Feature())
+ ? getLabelAfterInsn(TopLevelCallMI)
+ : nullptr;
// For tail calls, it's necessary to record the address of the branch
// instruction so that the debugger can show where the tail call occurred.
More information about the llvm-commits
mailing list