[lld] r287231 - Simplify. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 17 07:29:11 PST 2016
Author: rafael
Date: Thu Nov 17 09:29:11 2016
New Revision: 287231
URL: http://llvm.org/viewvc/llvm-project?rev=287231&view=rev
Log:
Simplify. NFC.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=287231&r1=287230&r2=287231&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu Nov 17 09:29:11 2016
@@ -571,9 +571,8 @@ static Symbol *addRegular(StringRef Name
typename ELFT::Sym LocalHidden = {};
LocalHidden.setBindingAndType(STB_LOCAL, STT_NOTYPE);
LocalHidden.setVisibility(STV_HIDDEN);
- Symbol *S = Symtab<ELFT>::X->addRegular(Name, LocalHidden, IS, nullptr);
- cast<DefinedRegular<ELFT>>(S->body())->Value = Value;
- return S;
+ LocalHidden.st_value = Value;
+ return Symtab<ELFT>::X->addRegular(Name, LocalHidden, IS, nullptr);
}
template <class ELFT>
More information about the llvm-commits
mailing list