[lld] b358dad - [ELF] Re-initialize InputFile::isInGroup so that elf::link can be called more than once

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 15:38:50 PDT 2020


Author: Fangrui Song
Date: 2020-08-14T15:38:41-07:00
New Revision: b358daddea04ea3c52e0e5bd5e851cee47f7f27f

URL: https://github.com/llvm/llvm-project/commit/b358daddea04ea3c52e0e5bd5e851cee47f7f27f
DIFF: https://github.com/llvm/llvm-project/commit/b358daddea04ea3c52e0e5bd5e851cee47f7f27f.diff

LOG: [ELF] Re-initialize InputFile::isInGroup so that elf::link can be called more than once

Added: 
    

Modified: 
    lld/ELF/Driver.cpp

Removed: 
    


################################################################################
diff  --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index e18392430329..12c8e5d7b059 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -1306,6 +1306,7 @@ void LinkerDriver::createFiles(opt::InputArgList &args) {
   std::vector<std::tuple<bool, bool, bool>> stack;
 
   // Iterate over argv to process input files and positional arguments.
+  InputFile::isInGroup = false;
   for (auto *arg : args) {
     switch (arg->getOption().getID()) {
     case OPT_library:


        


More information about the llvm-commits mailing list