[llvm] 65493fd - [MC] Simplify flushPendingLabels. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 12:12:50 PDT 2023


Author: Fangrui Song
Date: 2023-05-05T12:12:45-07:00
New Revision: 65493fd57a04546d4a31ea4451b76a093bb1d94b

URL: https://github.com/llvm/llvm-project/commit/65493fd57a04546d4a31ea4451b76a093bb1d94b
DIFF: https://github.com/llvm/llvm-project/commit/65493fd57a04546d4a31ea4451b76a093bb1d94b.diff

LOG: [MC] Simplify flushPendingLabels. NFC

Added: 
    

Modified: 
    llvm/lib/MC/MCSection.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/MC/MCSection.cpp b/llvm/lib/MC/MCSection.cpp
index 7547558fe6e2..883cb5d57963 100644
--- a/llvm/lib/MC/MCSection.cpp
+++ b/llvm/lib/MC/MCSection.cpp
@@ -94,9 +94,6 @@ void MCSection::addPendingLabel(MCSymbol *label, unsigned Subsection) {
 
 void MCSection::flushPendingLabels(MCFragment *F, uint64_t FOffset,
 				   unsigned Subsection) {
-  if (PendingLabels.empty())
-    return;
-
   // Set the fragment and fragment offset for all pending symbols in the
   // specified Subsection, and remove those symbols from the pending list.
   for (auto It = PendingLabels.begin(); It != PendingLabels.end(); ++It) {


        


More information about the llvm-commits mailing list