mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
tools: Unify how verifyModule() is called
Unify the error messages for the various tools when `verifyModule()` fails on an input module. The "brave new way" is: lltool: path/to/input.ll: error: input module is broken! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233667 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -116,9 +116,9 @@ int main(int argc, char **argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (verifyModule(*M)) {
|
||||
errs() << argv[0] << ": input module '" << InputFilenames[i]
|
||||
<< "' is broken!\n";
|
||||
if (verifyModule(*M, &errs())) {
|
||||
errs() << argv[0] << ": " << InputFilenames[i]
|
||||
<< ": error: input module is broken!\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -137,8 +137,8 @@ int main(int argc, char **argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (verifyModule(*Composite)) {
|
||||
errs() << argv[0] << ": linked module is broken!\n";
|
||||
if (verifyModule(*Composite, &errs())) {
|
||||
errs() << argv[0] << ": error: linked module is broken!\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user