Skip to content

Commit adbf59d

Browse files
[AsmPrinter] Remove an unnecessary cast (NFC) (#150839)
getLabelAfterInsn() already returns MCSymbol *.
1 parent c7cd1d0 commit adbf59d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -972,10 +972,9 @@ void DwarfDebug::constructCallSiteEntryDIEs(const DISubprogram &SP,
972972
// the call graph which could lead to some target function. For tail
973973
// calls, no return PC information is needed, unless tuning for GDB in
974974
// DWARF4 mode in which case we fake a return PC for compatibility.
975-
const MCSymbol *PCAddr =
976-
(!IsTail || CU.useGNUAnalogForDwarf5Feature())
977-
? const_cast<MCSymbol *>(getLabelAfterInsn(TopLevelCallMI))
978-
: nullptr;
975+
const MCSymbol *PCAddr = (!IsTail || CU.useGNUAnalogForDwarf5Feature())
976+
? getLabelAfterInsn(TopLevelCallMI)
977+
: nullptr;
979978

980979
// For tail calls, it's necessary to record the address of the branch
981980
// instruction so that the debugger can show where the tail call occurred.

0 commit comments

Comments
 (0)