summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputFiles.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-09-29 00:58:10 +0000
committerRui Ueyama <ruiu@google.com>2016-09-29 00:58:10 +0000
commitd72dd1fc4eb52b6026122c27a1bbbd7519080399 (patch)
tree2f6edd86eb3ca9862868a36534bf82d15e2dd113 /lld/ELF/InputFiles.cpp
parentac90058b807c7641e32391dcdced0de5f3e90eae (diff)
downloadbcm5719-llvm-d72dd1fc4eb52b6026122c27a1bbbd7519080399.tar.gz
bcm5719-llvm-d72dd1fc4eb52b6026122c27a1bbbd7519080399.zip
Use InputFile::Symbol instead of auto for consistency.
llvm-svn: 282658
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r--lld/ELF/InputFiles.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index d13a0b31b34..cc6d1892d95 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -815,13 +815,11 @@ template <class ELFT> std::vector<StringRef> LazyObjectFile::getElfSymbols() {
}
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;
}
OpenPOWER on IntegriCloud