mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Be a bit more robust. Explicitly check for a code generator crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11624 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8517e1f0be
commit
7c955fdb44
@ -147,6 +147,16 @@ bool BugDriver::run() {
|
||||
// Set up the execution environment, selecting a method to run LLVM bytecode.
|
||||
if (initializeExecutionEnvironment()) return true;
|
||||
|
||||
// Test to see if we have a code generator crash.
|
||||
std::cout << "Running the code generator to test for a crash: ";
|
||||
try {
|
||||
compileProgram(Program);
|
||||
} catch (ToolExecutionError &TEE) {
|
||||
std::cout << TEE.what();
|
||||
return debugCodeGeneratorCrash();
|
||||
}
|
||||
|
||||
|
||||
// Run the raw input to see where we are coming from. If a reference output
|
||||
// was specified, make sure that the raw output matches it. If not, it's a
|
||||
// problem in the front-end or the code generator.
|
||||
@ -189,7 +199,12 @@ bool BugDriver::run() {
|
||||
|
||||
std::cout << "\n*** Input program does not match reference diff!\n";
|
||||
std::cout << "Debugging code generator problem!\n";
|
||||
try {
|
||||
return debugCodeGenerator();
|
||||
} catch (ToolExecutionError &TEE) {
|
||||
std::cerr << TEE.what();
|
||||
return debugCodeGeneratorCrash();
|
||||
}
|
||||
}
|
||||
|
||||
void BugDriver::PrintFunctionList(const std::vector<Function*> &Funcs) {
|
||||
|
Loading…
Reference in New Issue
Block a user