[lld] 491a5c9 - [MachO] Fix formatting. NFC

Shoaib Meenai via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 13:01:49 PDT 2022


Author: Shoaib Meenai
Date: 2022-08-22T23:00:07+03:00
New Revision: 491a5c9570e2a6caf0f077f333631d69762d3742

URL: https://github.com/llvm/llvm-project/commit/491a5c9570e2a6caf0f077f333631d69762d3742
DIFF: https://github.com/llvm/llvm-project/commit/491a5c9570e2a6caf0f077f333631d69762d3742.diff

LOG: [MachO] Fix formatting. NFC

The style guide says that all arms of an if-else should have braces if
any arm does [1].

[1] https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements

Added: 
    

Modified: 
    lld/MachO/InputFiles.cpp

Removed: 
    


################################################################################
diff  --git a/lld/MachO/InputFiles.cpp b/lld/MachO/InputFiles.cpp
index 55d4888f60c2d..fde8ff52ca4a3 100644
--- a/lld/MachO/InputFiles.cpp
+++ b/lld/MachO/InputFiles.cpp
@@ -1510,9 +1510,9 @@ void ObjFile::registerEhFrames(Section &ehFrameSection) {
       // embedded in the section data (AKA an "abs-ified" reloc.). Parse that
       // and generate a Reloc struct.
       uint32_t cieMinuend = reader.readU32(&dataOff);
-      if (cieMinuend == 0)
+      if (cieMinuend == 0) {
         cieIsec = isec;
-      else {
+      } else {
         uint32_t cieOff = isecOff + dataOff - cieMinuend;
         cieIsec = findContainingSubsection(ehFrameSection, &cieOff);
         if (cieIsec == nullptr)


        


More information about the llvm-commits mailing list