forked from OSchip/llvm-project
Make empty arguments visible in error messages.
Before this patch, lld printed out something like error: -O: number expected, but got After this patch, it prints out the same error message like this: error: -O: number expected, but got '' Fixes https://bugs.llvm.org/show_bug.cgi?id=34311 llvm-svn: 311681
This commit is contained in:
parent
1b6d8713e4
commit
00cf731ecd
|
@ -283,7 +283,7 @@ static int getInteger(opt::InputArgList &Args, unsigned Key, int Default) {
|
|||
if (auto *Arg = Args.getLastArg(Key)) {
|
||||
StringRef S = Arg->getValue();
|
||||
if (!to_integer(S, V, 10))
|
||||
error(Arg->getSpelling() + ": number expected, but got " + S);
|
||||
error(Arg->getSpelling() + ": number expected, but got '" + S + "'");
|
||||
}
|
||||
return V;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue