[lld] r262685 - Use check function.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 17:56:52 PST 2016
Author: ruiu
Date: Thu Mar 3 19:56:52 2016
New Revision: 262685
URL: http://llvm.org/viewvc/llvm-project?rev=262685&view=rev
Log:
Use check function.
Modified:
lld/trunk/ELF/InputFiles.cpp
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=262685&r1=262684&r2=262685&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Thu Mar 3 19:56:52 2016
@@ -400,10 +400,7 @@ template <class ELFT> void SharedFile<EL
uint32_t NumSymbols = std::distance(Syms.begin(), Syms.end());
SymbolBodies.reserve(NumSymbols);
for (const Elf_Sym &Sym : Syms) {
- ErrorOr<StringRef> NameOrErr = Sym.getName(this->StringTable);
- check(NameOrErr.getError());
- StringRef Name = *NameOrErr;
-
+ StringRef Name = check(Sym.getName(this->StringTable));
if (Sym.isUndefined())
Undefs.push_back(Name);
else
More information about the llvm-commits
mailing list