[llvm] 338e38b - ELFObjectWriter: Delete redundant registerSymbol

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 13 12:01:44 PST 2021


Author: Fangrui Song
Date: 2021-02-13T12:01:37-08:00
New Revision: 338e38b33a2bf2d5e705e387e3a5e3f020f7c3d1

URL: https://github.com/llvm/llvm-project/commit/338e38b33a2bf2d5e705e387e3a5e3f020f7c3d1
DIFF: https://github.com/llvm/llvm-project/commit/338e38b33a2bf2d5e705e387e3a5e3f020f7c3d1.diff

LOG: ELFObjectWriter: Delete redundant registerSymbol

MCELFStreamer::changeSection has registered the group signature symbol.

Added: 
    

Modified: 
    llvm/lib/MC/ELFObjectWriter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index f7d88377e86b..714fc98eeec1 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -1119,7 +1119,6 @@ uint64_t ELFWriter::writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) {
     MCSectionELF *RelSection = createRelocationSection(Ctx, Section);
 
     if (SignatureSymbol) {
-      Asm.registerSymbol(*SignatureSymbol);
       unsigned &GroupIdx = RevGroupMap[SignatureSymbol];
       if (!GroupIdx) {
         MCSectionELF *Group = Ctx.createELFGroupSection(SignatureSymbol);


        


More information about the llvm-commits mailing list