diff options
| author | Rui Ueyama <ruiu@google.com> | 2014-12-10 00:33:00 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2014-12-10 00:33:00 +0000 |
| commit | 00eb257f2e908e5ec81bbe00aeeb42ea4aa4fd79 (patch) | |
| tree | ecd3def36561bcc8ade871e50674266fa47c7611 /lld/lib/Driver/GnuLdInputGraph.cpp | |
| parent | f3108ce3e8fa2f6440810512d53d84ed869569fb (diff) | |
| download | bcm5719-llvm-00eb257f2e908e5ec81bbe00aeeb42ea4aa4fd79.tar.gz bcm5719-llvm-00eb257f2e908e5ec81bbe00aeeb42ea4aa4fd79.zip | |
Re-commit r223330: Rewrite InputGraph's Group
llvm-svn: 223867
Diffstat (limited to 'lld/lib/Driver/GnuLdInputGraph.cpp')
| -rw-r--r-- | lld/lib/Driver/GnuLdInputGraph.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lld/lib/Driver/GnuLdInputGraph.cpp b/lld/lib/Driver/GnuLdInputGraph.cpp index 6fd1ebd08e8..f1a09220b5c 100644 --- a/lld/lib/Driver/GnuLdInputGraph.cpp +++ b/lld/lib/Driver/GnuLdInputGraph.cpp @@ -91,7 +91,7 @@ std::error_code ELFGNULdScript::parse(const LinkingContext &ctx, auto *group = dyn_cast<script::Group>(c); if (!group) continue; - std::unique_ptr<Group> groupStart(new Group()); + size_t numfiles = 0; for (const script::Path &path : group->getPaths()) { // TODO : Propagate Set WholeArchive/dashlPrefix attributes.setAsNeeded(path._asNeeded); @@ -100,9 +100,10 @@ std::error_code ELFGNULdScript::parse(const LinkingContext &ctx, _elfLinkingContext, _elfLinkingContext.allocateString(path._path), attributes); std::unique_ptr<InputElement> inputFile(inputNode); - groupStart.get()->addFile(std::move(inputFile)); + _expandElements.push_back(std::move(inputFile)); + ++numfiles; } - _expandElements.push_back(std::move(groupStart)); + _expandElements.push_back(llvm::make_unique<GroupEnd>(numfiles)); } return std::error_code(); } |

