forked from OSchip/llvm-project
Don't use iterator for the same reason as r226883.
llvm-svn: 226893
This commit is contained in:
parent
f16dbb8b07
commit
0330697bfc
|
@ -801,8 +801,9 @@ parseArgs(int argc, const char **argv, PECOFFLinkingContext &ctx,
|
|||
// graph.
|
||||
static bool hasLibrary(PECOFFLinkingContext &ctx, File *file) {
|
||||
StringRef path = file->path();
|
||||
for (std::unique_ptr<Node> &p : ctx.getNodes())
|
||||
if (auto *f = dyn_cast<FileNode>(p.get()))
|
||||
std::vector<std::unique_ptr<Node>> &nodes = ctx.getNodes();
|
||||
for (size_t i = 0; i < nodes.size(); ++i)
|
||||
if (auto *f = dyn_cast<FileNode>(nodes[i].get()))
|
||||
if (f->getFile()->path() == path)
|
||||
return true;
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue