@@ -58,9 +58,9 @@ static void handleColorDiagnostics(Ctx &ctx, opt::InputArgList &args) {
58
58
return ;
59
59
StringRef s = arg->getValue ();
60
60
if (s == " always" )
61
- lld:: errs ().enable_colors (true );
61
+ ctx. errHandler -> errs ().enable_colors (true );
62
62
else if (s == " never" )
63
- lld:: errs ().enable_colors (false );
63
+ ctx. errHandler -> errs ().enable_colors (false );
64
64
else if (s != " auto" )
65
65
ErrAlways (ctx) << " unknown option: --color-diagnostics=" << s;
66
66
}
@@ -139,16 +139,17 @@ opt::InputArgList ELFOptTable::parse(Ctx &ctx, ArrayRef<const char *> argv) {
139
139
}
140
140
141
141
void elf::printHelp (Ctx &ctx) {
142
+ auto &outs = ctx.errHandler ->outs ();
142
143
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 " ;
146
147
147
148
// Scripts generated by Libtool versions up to 2021-10 expect /: supported
148
149
// targets:.* elf/ in a message for the --help option. If it doesn't match,
149
150
// the scripts assume that the linker doesn't support very basic features
150
151
// 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 " ;
152
153
}
153
154
154
155
static std::string rewritePath (StringRef s) {
0 commit comments