[lld] r282658 - Use InputFile::Symbol instead of auto for consistency.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 28 17:58:11 PDT 2016
Author: ruiu
Date: Wed Sep 28 19:58:10 2016
New Revision: 282658
URL: http://llvm.org/viewvc/llvm-project?rev=282658&view=rev
Log:
Use InputFile::Symbol instead of auto for consistency.
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=282658&r1=282657&r2=282658&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Wed Sep 28 19:58:10 2016
@@ -815,13 +815,11 @@ template <class ELFT> std::vector<String
}
std::vector<StringRef> LazyObjectFile::getBitcodeSymbols() {
- std::vector<StringRef> V;
std::unique_ptr<lto::InputFile> Obj = check(lto::InputFile::create(this->MB));
- for (auto &ObjSym : Obj->symbols()) {
- if (ObjSym.getFlags() & BasicSymbolRef::SF_Undefined)
- continue;
- V.push_back(Saver.save(ObjSym.getName()));
- }
+ std::vector<StringRef> V;
+ for (const lto::InputFile::Symbol &Sym : Obj->symbols())
+ if (!(Sym.getFlags() & BasicSymbolRef::SF_Undefined))
+ V.push_back(Saver.save(Sym.getName()));
return V;
}
More information about the llvm-commits
mailing list