[lld] [lld-macho][NFC] Track category merger input data source language for better verification (PR #95473)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 15:47:09 PDT 2024


================
@@ -772,10 +783,10 @@ void ObjcCategoryMerger::parseCatInfoToExtInfo(const InfoInputCategory &catInfo,
   assert(catNameReloc && "Category does not have a reloc at 'nameOffset'");
 
   // is this the first category we are parsing?
-  if (extInfo.mergedContainerName.empty())
+  if (extInfo.mergedContainerName.empty()) {
     extInfo.objFileForMergeData =
         dyn_cast_or_null<ObjFile>(catInfo.catBodyIsec->getFile());
-  else
+  } else
----------------
ellishg wrote:

These changes don't seem necessary. It technically complies with the coding standards.

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

https://github.com/llvm/llvm-project/pull/95473


More information about the llvm-commits mailing list