Fix use of uninitialized.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 6 Apr 2016 12:19:25 +0000 (12:19 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 6 Apr 2016 12:19:25 +0000 (12:19 +0000)
The names of undefined locals are not used, so I don't think it is
possible to actually test this.

llvm-svn: 265534

lld/ELF/Symbols.cpp

index 445fe30..78fabc8 100644 (file)
@@ -262,7 +262,7 @@ UndefinedElf<ELFT>::UndefinedElf(StringRef N, const Elf_Sym &Sym)
 
 template <typename ELFT>
 UndefinedElf<ELFT>::UndefinedElf(const Elf_Sym &Sym)
-    : Undefined(SymbolBody::UndefinedElfKind, NameOffset, Sym.st_other,
+    : Undefined(SymbolBody::UndefinedElfKind, Sym.st_name, Sym.st_other,
                 Sym.getType()),
       Size(Sym.st_size) {
   assert(Sym.getBinding() == STB_LOCAL);