Skip to content

Commit bc66e9a

Browse files
committed
[lld-link] Replace message(...) with Msg(ctx)
to avoid the global ctx.
1 parent 932c524 commit bc66e9a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lld/COFF/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1638,7 +1638,7 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
16381638
// because it doesn't start with "/", but we deliberately chose "--" to
16391639
// avoid conflict with /version and for compatibility with clang-cl.
16401640
if (args.hasArg(OPT_dash_dash_version)) {
1641-
message(getLLDVersion());
1641+
Msg(ctx) << getLLDVersion();
16421642
return;
16431643
}
16441644

lld/COFF/DriverUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ opt::InputArgList ArgParser::parse(ArrayRef<const char *> argv) {
922922
std::string msg = "Command line:";
923923
for (const char *s : expandedArgv)
924924
msg += " " + std::string(s);
925-
message(msg);
925+
Msg(ctx) << msg;
926926
}
927927

928928
// Save the command line after response file expansion so we can write it to

lld/COFF/PDB.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ void PDBLinker::printStats() {
13171317
printLargeInputTypeRecs("IPI", tMerger.ipiCounts, tMerger.getIDTable());
13181318
}
13191319

1320-
message(buffer);
1320+
Msg(ctx) << buffer;
13211321
}
13221322

13231323
void PDBLinker::addNatvisFiles() {

0 commit comments

Comments
 (0)