mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Remove exception handling usage from tblgen.
Most places can use PrintFatalError as the unwinding mechanism was not used for anything other than printing the error. The single exception was CodeGenDAGPatterns.cpp, where intermediate errors during type resolution were ignored to simplify incremental platform development. This use is replaced by an error flag in TreePattern and bailout earlier in various places if it is set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166712 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "DAGISelMatcher.h"
|
||||
#include "CodeGenDAGPatterns.h"
|
||||
#include "CodeGenRegisters.h"
|
||||
#include "llvm/TableGen/Error.h"
|
||||
#include "llvm/TableGen/Record.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
@@ -172,15 +173,10 @@ void MatcherGen::InferPossibleTypes() {
|
||||
// diagnostics, which we know are impossible at this point.
|
||||
TreePattern &TP = *CGP.pf_begin()->second;
|
||||
|
||||
try {
|
||||
bool MadeChange = true;
|
||||
while (MadeChange)
|
||||
MadeChange = PatWithNoTypes->ApplyTypeConstraints(TP,
|
||||
true/*Ignore reg constraints*/);
|
||||
} catch (...) {
|
||||
errs() << "Type constraint application shouldn't fail!";
|
||||
abort();
|
||||
}
|
||||
bool MadeChange = true;
|
||||
while (MadeChange)
|
||||
MadeChange = PatWithNoTypes->ApplyTypeConstraints(TP,
|
||||
true/*Ignore reg constraints*/);
|
||||
}
|
||||
|
||||
|
||||
@@ -876,7 +872,7 @@ void MatcherGen::EmitResultOperand(const TreePatternNode *N,
|
||||
if (OpRec->isSubClassOf("SDNodeXForm"))
|
||||
return EmitResultSDNodeXFormAsOperand(N, ResultOps);
|
||||
errs() << "Unknown result node to emit code for: " << *N << '\n';
|
||||
throw std::string("Unknown node in result pattern!");
|
||||
PrintFatalError("Unknown node in result pattern!");
|
||||
}
|
||||
|
||||
void MatcherGen::EmitResultCode() {
|
||||
|
||||
Reference in New Issue
Block a user