mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
print a nice error if bugpoint gets an error reading inputs. Bug identified
by coverity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28298 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f877e60616
commit
53bd1b9de7
@ -94,7 +94,8 @@ bool BugDriver::addSources(const std::vector<std::string> &Filenames) {
|
|||||||
assert(Program == 0 && "Cannot call addSources multiple times!");
|
assert(Program == 0 && "Cannot call addSources multiple times!");
|
||||||
assert(!Filenames.empty() && "Must specify at least on input filename!");
|
assert(!Filenames.empty() && "Must specify at least on input filename!");
|
||||||
|
|
||||||
// Load the first input file...
|
try {
|
||||||
|
// Load the first input file.
|
||||||
Program = ParseInputFile(Filenames[0]);
|
Program = ParseInputFile(Filenames[0]);
|
||||||
if (Program == 0) return true;
|
if (Program == 0) return true;
|
||||||
if (!run_as_child)
|
if (!run_as_child)
|
||||||
@ -113,6 +114,10 @@ bool BugDriver::addSources(const std::vector<std::string> &Filenames) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (const std::string &Error) {
|
||||||
|
std::cerr << ToolName << ": error reading input '" << Error << "'\n";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!run_as_child)
|
if (!run_as_child)
|
||||||
std::cout << "*** All input ok\n";
|
std::cout << "*** All input ok\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user