[LLVM][tools] Remove unnecessary newline from error message (#120037)
The previous missing a newline: ```shell $ llc --mattr=help llc: error: unable to get target for 'unknown', see --version and --triple.$ ```
This commit is contained in:
parent
95e509a989
commit
aff3e68d6f
@ -126,7 +126,7 @@ const Target *TargetRegistry::lookupTarget(StringRef ArchName,
|
|||||||
[&](const Target &T) { return ArchName == T.getName(); });
|
[&](const Target &T) { return ArchName == T.getName(); });
|
||||||
|
|
||||||
if (I == targets().end()) {
|
if (I == targets().end()) {
|
||||||
Error = ("invalid target '" + ArchName + "'.\n").str();
|
Error = ("invalid target '" + ArchName + "'.").str();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,8 +3,11 @@
|
|||||||
|
|
||||||
; Check the error message doesn't say error twice.
|
; Check the error message doesn't say error twice.
|
||||||
|
|
||||||
; MARCH: {{.*}}llc{{.*}}: error: invalid target 'arst'.{{$}}
|
; MARCH: {{.*}}llc{{.*}}: error: invalid target 'arst'.
|
||||||
; MTRIPLE: {{.*}}llc{{.*}}: error: unable to get target for 'arst-unknown-unknown', see --version and --triple.{{$}}
|
; MARCH-EMPTY:
|
||||||
|
;
|
||||||
|
; MTRIPLE: {{.*}}llc{{.*}}: error: unable to get target for 'arst-unknown-unknown', see --version and --triple.
|
||||||
|
; MTRIPLE-EMPTY:
|
||||||
|
|
||||||
define void @func() {
|
define void @func() {
|
||||||
ret void
|
ret void
|
||||||
|
@ -549,7 +549,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
|
|||||||
TheTarget =
|
TheTarget =
|
||||||
TargetRegistry::lookupTarget(codegen::getMArch(), TheTriple, Error);
|
TargetRegistry::lookupTarget(codegen::getMArch(), TheTriple, Error);
|
||||||
if (!TheTarget) {
|
if (!TheTarget) {
|
||||||
WithColor::error(errs(), argv[0]) << Error;
|
WithColor::error(errs(), argv[0]) << Error << "\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -592,7 +592,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
|
|||||||
TheTarget =
|
TheTarget =
|
||||||
TargetRegistry::lookupTarget(codegen::getMArch(), TheTriple, Error);
|
TargetRegistry::lookupTarget(codegen::getMArch(), TheTriple, Error);
|
||||||
if (!TheTarget) {
|
if (!TheTarget) {
|
||||||
WithColor::error(errs(), argv[0]) << Error;
|
WithColor::error(errs(), argv[0]) << Error << "\n";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user