diff options
| author | Fangrui Song <i@maskray.me> | 2024-11-16 22:34:12 -0800 |
|---|---|---|
| committer | Fangrui Song <i@maskray.me> | 2024-11-16 22:34:13 -0800 |
| commit | 2991a4e2097ab3f32d37fdceab08c658836e312c (patch) | |
| tree | 7bf051059609d96ea3b9405be68384db17a4c378 /lld/ELF/ScriptParser.cpp | |
| parent | 8f238f662c8237b88392f8a94469cd50d86636d6 (diff) | |
[ELF] Replace functions bAlloc/saver/uniqueSaver with member access
Diffstat (limited to 'lld/ELF/ScriptParser.cpp')
| -rw-r--r-- | lld/ELF/ScriptParser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp index f7e3a5e418d5..f53515cc3f3c 100644 --- a/lld/ELF/ScriptParser.cpp +++ b/lld/ELF/ScriptParser.cpp @@ -317,7 +317,7 @@ void ScriptParser::addFile(StringRef s) { SmallString<128> pathData; StringRef path = (ctx.arg.sysroot + s).toStringRef(pathData); if (sys::fs::exists(path)) - ctx.driver.addFile(saver(ctx).save(path), /*withLOption=*/false); + ctx.driver.addFile(ctx.saver.save(path), /*withLOption=*/false); else setError("cannot find " + s + " inside " + ctx.arg.sysroot); return; @@ -331,7 +331,7 @@ void ScriptParser::addFile(StringRef s) { if (ctx.arg.sysroot.empty()) ctx.driver.addFile(s.substr(1), /*withLOption=*/false); else - ctx.driver.addFile(saver(ctx).save(ctx.arg.sysroot + "/" + s.substr(1)), + ctx.driver.addFile(ctx.saver.save(ctx.arg.sysroot + "/" + s.substr(1)), /*withLOption=*/false); } else if (s.starts_with("-l")) { // Case 3: search in the list of library paths. @@ -354,7 +354,7 @@ void ScriptParser::addFile(StringRef s) { } else { // Finally, search in the list of library paths. if (std::optional<std::string> path = findFromSearchPaths(ctx, s)) - ctx.driver.addFile(saver(ctx).save(*path), /*withLOption=*/true); + ctx.driver.addFile(ctx.saver.save(*path), /*withLOption=*/true); else setError("unable to find " + s); } |
