Delete dead code.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 5 Aug 2015 13:26:54 +0000 (13:26 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 5 Aug 2015 13:26:54 +0000 (13:26 +0000)
llvm-svn: 244040

lld/ELF/SymbolTable.cpp
lld/ELF/Symbols.cpp
lld/ELF/Symbols.h

index c7b0e08..126e70e 100644 (file)
@@ -34,8 +34,7 @@ void SymbolTable::addObject(ObjectFileBase *File) {
 
   ObjectFiles.emplace_back(File);
   for (SymbolBody *Body : File->getSymbols())
-    if (Body->isExternal())
-      resolve(Body);
+    resolve(Body);
 }
 
 void SymbolTable::reportRemainingUndefines() {
index 35bc499..b6ac08e 100644 (file)
@@ -28,10 +28,8 @@ getSymbolName(const llvm::object::ELFFile<ELFT> *F,
 
 template <class ELFT>
 DefinedRegular<ELFT>::DefinedRegular(ObjectFile<ELFT> *F, const Elf_Sym *S)
-    : Defined(DefinedRegularKind, getSymbolName<ELFT>(F->getObj(), S)), File(F),
-      Sym(S) {
-  IsExternal = S->isExternal();
-}
+    : Defined(DefinedRegularKind, getSymbolName<ELFT>(F->getObj(), S)),
+      File(F) {}
 
 // Returns 1, 0 or -1 if this symbol should take precedence
 // over the Other, tie or lose, respectively.
index 2018fd6..a039d6a 100644 (file)
@@ -43,9 +43,6 @@ public:
 
   Kind kind() const { return static_cast<Kind>(SymbolKind); }
 
-  // Returns true if this is an external symbol.
-  bool isExternal() const { return true; }
-
   // Returns the symbol name.
   StringRef getName() const { return Name; }
 
@@ -65,11 +62,10 @@ public:
 
 protected:
   SymbolBody(Kind K, StringRef N = "")
-      : SymbolKind(K), IsExternal(true), Name(N) {}
+      : SymbolKind(K), Name(N) {}
 
 protected:
   const unsigned SymbolKind : 8;
-  unsigned IsExternal : 1;
   StringRef Name;
   Symbol *Backref = nullptr;
 };
@@ -99,7 +95,6 @@ public:
 
 private:
   ObjectFile<ELFT> *File;
-  const Elf_Sym *Sym;
 };
 
 // Undefined symbols.