[lld] r266298 - Combine code branch into single line. NFC.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 06:00:04 PDT 2016


Author: grimar
Date: Thu Apr 14 08:00:03 2016
New Revision: 266298

URL: http://llvm.org/viewvc/llvm-project?rev=266298&view=rev
Log:
Combine code branch into single line. NFC.

Modified:
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=266298&r1=266297&r2=266298&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu Apr 14 08:00:03 2016
@@ -1051,11 +1051,8 @@ OutputSectionFactory<ELFT>::createKey(In
   // This makes each output section simple and keeps a single level mapping from
   // input to output.
   uintX_t Alignment = 0;
-  if (isa<MergeInputSection<ELFT>>(C)) {
-    Alignment = H->sh_addralign;
-    if (H->sh_entsize > Alignment)
-      Alignment = H->sh_entsize;
-  }
+  if (isa<MergeInputSection<ELFT>>(C))
+    Alignment = std::max(H->sh_addralign, H->sh_entsize);
 
   // GNU as can give .eh_frame secion type SHT_PROGBITS or SHT_X86_64_UNWIND
   // depending on the construct. We want to canonicalize it so that




More information about the llvm-commits mailing list