Before, "[options] <inputs>" is unconditionally appended to the Name parameter. It is more flexible to change its semantic to Usage and let user customize the usage line.
% llvm-objcopy
...
USAGE: llvm-objcopy <input> [ <output> ] [options] <inputs>
With this patch:
% llvm-objcopy
...
USAGE: llvm-objcopy input [output]
What about including optional usage as a separate arg? e.g.
void PrintHelp(raw_ostream &OS, StringRef Name, StringRef Title, StringRef Usage="", ...) { OS << "USAGE: " << Name << (!Usage.empty() ? Usage : " [options] <inputs>") << '\n'; ... }It's yet another method parameter, but there's zero magic involved.