[llvm] 9718201 - [MC] Delete redundant alignment update from MCELFStreamer::EmitCommonSymbol. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 23:08:38 PST 2019


Author: Fangrui Song
Date: 2019-12-16T23:08:32-08:00
New Revision: 97182013c4587e85d5ce3231e66fea41d58d4fa9

URL: https://github.com/llvm/llvm-project/commit/97182013c4587e85d5ce3231e66fea41d58d4fa9
DIFF: https://github.com/llvm/llvm-project/commit/97182013c4587e85d5ce3231e66fea41d58d4fa9.diff

LOG: [MC] Delete redundant alignment update from MCELFStreamer::EmitCommonSymbol. NFC

EmitValueToAlignment() updates the maximum alignment.

Added: 
    

Modified: 
    llvm/lib/MC/MCELFStreamer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp
index c2e2beb23cb7..0a0c30df9c07 100644
--- a/llvm/lib/MC/MCELFStreamer.cpp
+++ b/llvm/lib/MC/MCELFStreamer.cpp
@@ -308,10 +308,6 @@ void MCELFStreamer::EmitCommonSymbol(MCSymbol *S, uint64_t Size,
     EmitLabel(Symbol);
     EmitZeros(Size);
 
-    // Update the maximum alignment of the section if necessary.
-    if (ByteAlignment > Section.getAlignment())
-      Section.setAlignment(Align(ByteAlignment));
-
     SwitchSection(P.first, P.second);
   } else {
     if(Symbol->declareCommon(Size, ByteAlignment))


        


More information about the llvm-commits mailing list