[lld] r255854 - ELF: Remove a dumb constructor.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 16:01:26 PST 2015


Author: ruiu
Date: Wed Dec 16 18:01:25 2015
New Revision: 255854

URL: http://llvm.org/viewvc/llvm-project?rev=255854&view=rev
Log:
ELF: Remove a dumb constructor.

Symbol is a struct and can be initialized using an initializer.

Modified:
    lld/trunk/ELF/SymbolTable.cpp
    lld/trunk/ELF/Symbols.h

Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=255854&r1=255853&r2=255854&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Wed Dec 16 18:01:25 2015
@@ -195,7 +195,7 @@ template <class ELFT> Symbol *SymbolTabl
   StringRef Name = New->getName();
   Symbol *&Sym = Symtab[Name];
   if (!Sym)
-    Sym = new (Alloc) Symbol(New);
+    Sym = new (Alloc) Symbol{New};
   New->setBackref(Sym);
   return Sym;
 }

Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=255854&r1=255853&r2=255854&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Wed Dec 16 18:01:25 2015
@@ -48,7 +48,6 @@ void initSymbols();
 // through a Symbol. There's always one Symbol for each symbol name.
 // The resolver updates SymbolBody pointers as it resolves symbols.
 struct Symbol {
-  explicit Symbol(SymbolBody *P) : Body(P) {}
   SymbolBody *Body;
 };
 




More information about the llvm-commits mailing list