[ELF] Replace warn(...) with Warn

This commit is contained in:
Fangrui Song
2024-11-06 22:19:31 -08:00
parent 09c2c5e1e9
commit f8bae3af74
16 changed files with 114 additions and 100 deletions

View File

@@ -306,7 +306,8 @@ void ScriptParser::readNoCrossRefs(bool to) {
while (auto tok = till(")"))
cmd.outputSections.push_back(unquote(tok));
if (cmd.outputSections.size() < 2)
warn(getCurrentLocation() + ": ignored with fewer than 2 output sections");
Warn(ctx) << getCurrentLocation()
<< ": ignored with fewer than 2 output sections";
else
ctx.script->noCrossRefs.push_back(std::move(cmd));
}