[lld] [lld][COFF] Fix: Merge `.drectve` sections in ObjFile::readSections (PR #86380)
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 24 18:32:13 PDT 2024
================
@@ -365,13 +365,20 @@ bool LinkerDriver::isDecorated(StringRef sym) {
(!ctx.config.mingw && sym.contains('@'));
}
-// Parses .drectve section contents and returns a list of files
-// specified by /defaultlib.
-void LinkerDriver::parseDirectives(InputFile *file) {
- StringRef s = file->getDirectives();
- if (s.empty())
+void LinkerDriver::processDrectveSections(InputFile *file) {
+ std::vector<StringRef> directivesList = file->getDrectves();
+ if (directivesList.empty())
return;
+ for (StringRef s : directivesList) {
----------------
aganea wrote:
Can we just write `for (StringRef s : file->getDirectives())`, without all the above?
https://github.com/llvm/llvm-project/pull/86380
More information about the llvm-commits
mailing list