@@ -58,9 +58,9 @@ static void handleColorDiagnostics(Ctx &ctx, opt::InputArgList &args) {
5858 return ;
5959 StringRef s = arg->getValue ();
6060 if (s == " always" )
61- lld:: errs ().enable_colors (true );
61+ ctx. errHandler -> errs ().enable_colors (true );
6262 else if (s == " never" )
63- lld:: errs ().enable_colors (false );
63+ ctx. errHandler -> errs ().enable_colors (false );
6464 else if (s != " auto" )
6565 ErrAlways (ctx) << " unknown option: --color-diagnostics=" << s;
6666}
@@ -139,16 +139,17 @@ opt::InputArgList ELFOptTable::parse(Ctx &ctx, ArrayRef<const char *> argv) {
139139}
140140
141141void elf::printHelp (Ctx &ctx) {
142+ auto &outs = ctx.errHandler ->outs ();
142143 ELFOptTable ().printHelp (
143- lld:: outs() , (ctx.arg .progName + " [options] file..." ).str ().c_str (),
144- " lld " , false /* ShowHidden*/ , true /* ShowAllAliases*/ );
145- lld:: outs() << " \n " ;
144+ outs, (ctx.arg .progName + " [options] file..." ).str ().c_str (), " lld " ,
145+ false /* ShowHidden*/ , true /* ShowAllAliases*/ );
146+ outs << " \n " ;
146147
147148 // Scripts generated by Libtool versions up to 2021-10 expect /: supported
148149 // targets:.* elf/ in a message for the --help option. If it doesn't match,
149150 // the scripts assume that the linker doesn't support very basic features
150151 // such as shared libraries. Therefore, we need to print out at least "elf".
151- lld:: outs() << ctx.arg .progName << " : supported targets: elf\n " ;
152+ outs << ctx.arg .progName << " : supported targets: elf\n " ;
152153}
153154
154155static std::string rewritePath (StringRef s) {
0 commit comments