[llvm] 7b86fbb - [MC] Remove redundant MCSection::empty check. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 21 23:02:50 PST 2024
Author: Fangrui Song
Date: 2024-12-21T23:02:45-08:00
New Revision: 7b86fbbab74a6301d99017364b5369b98bdd7985
URL: https://github.com/llvm/llvm-project/commit/7b86fbbab74a6301d99017364b5369b98bdd7985
DIFF: https://github.com/llvm/llvm-project/commit/7b86fbbab74a6301d99017364b5369b98bdd7985.diff
LOG: [MC] Remove redundant MCSection::empty check. NFC
The section cannot be empty due to allocInitialFragment.
Added:
Modified:
llvm/lib/MC/WinCOFFObjectWriter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp
index 2d883e974a584a..09d2b08e43050f 100644
--- a/llvm/lib/MC/WinCOFFObjectWriter.cpp
+++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp
@@ -323,7 +323,7 @@ void WinCOFFWriter::defineSection(const MCAssembler &Asm,
Section->MCSection = &MCSec;
SectionMap[&MCSec] = Section;
- if (UseOffsetLabels && !MCSec.empty()) {
+ if (UseOffsetLabels) {
const uint32_t Interval = 1 << OffsetLabelIntervalBits;
uint32_t N = 1;
for (uint32_t Off = Interval, E = Asm.getSectionAddressSize(MCSec); Off < E;
More information about the llvm-commits
mailing list