[llvm] 11278cf - [MC] Remove a redundant cast (NFC) (#168298)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 16 16:34:30 PST 2025
Author: Kazu Hirata
Date: 2025-11-16T16:34:26-08:00
New Revision: 11278cf63c8f7e635d52c675a695c8974cb197d2
URL: https://github.com/llvm/llvm-project/commit/11278cf63c8f7e635d52c675a695c8974cb197d2
DIFF: https://github.com/llvm/llvm-project/commit/11278cf63c8f7e635d52c675a695c8974cb197d2.diff
LOG: [MC] Remove a redundant cast (NFC) (#168298)
Symbol is already of type MCSymbolELF *.
Identified with readability-redundant-casting.
Added:
Modified:
llvm/lib/MC/MCELFStreamer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp
index 1bc1b92610871..973e98dd1fa29 100644
--- a/llvm/lib/MC/MCELFStreamer.cpp
+++ b/llvm/lib/MC/MCELFStreamer.cpp
@@ -271,8 +271,7 @@ void MCELFStreamer::emitCommonSymbol(MCSymbol *S, uint64_t Size,
" redeclared as
diff erent type");
}
- static_cast<MCSymbolELF *>(Symbol)->setSize(
- MCConstantExpr::create(Size, getContext()));
+ Symbol->setSize(MCConstantExpr::create(Size, getContext()));
}
void MCELFStreamer::emitELFSize(MCSymbol *Symbol, const MCExpr *Value) {
More information about the llvm-commits
mailing list