[llvm] 3b20ac0 - [NFC]Don't use else after a return (#132644)

via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 23 18:34:55 PDT 2025


Author: Mingming Liu
Date: 2025-03-23T18:34:52-07:00
New Revision: 3b20ac00f915d3c3a34222de429fa0a0a47d7dbc

URL: https://github.com/llvm/llvm-project/commit/3b20ac00f915d3c3a34222de429fa0a0a47d7dbc
DIFF: https://github.com/llvm/llvm-project/commit/3b20ac00f915d3c3a34222de429fa0a0a47d7dbc.diff

LOG: [NFC]Don't use else after a return (#132644)

A trivial code clean-up per
https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return

Added: 
    

Modified: 
    llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 59417d010df43..a6b5e2e94c79c 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -983,10 +983,10 @@ MCSection *TargetLoweringObjectFileELF::getUniqueSectionForFunction(
     return selectExplicitSectionGlobal(
         &F, Kind, TM, getContext(), getMangler(), NextUniqueID,
         Used.count(&F), /* ForceUnique = */true);
-  else
-    return selectELFSectionForGlobal(
-        getContext(), &F, Kind, getMangler(), TM, Used.count(&F),
-        /*EmitUniqueSection=*/true, Flags, &NextUniqueID);
+
+  return selectELFSectionForGlobal(
+      getContext(), &F, Kind, getMangler(), TM, Used.count(&F),
+      /*EmitUniqueSection=*/true, Flags, &NextUniqueID);
 }
 
 MCSection *TargetLoweringObjectFileELF::getSectionForJumpTable(


        


More information about the llvm-commits mailing list